pcap_fopen_offline(), so that we initialize various function pointers
(not just the oneshot callback, but also functions such as the "can set
rfmon mode" function).
bpf_u_int32 magic;
int linklen;
bpf_u_int32 magic;
int linklen;
- p = (pcap_t *)malloc(sizeof(*p));
- if (p == NULL) {
- strlcpy(errbuf, "out of swap", PCAP_ERRBUF_SIZE);
+ p = pcap_create_common("(savefile)", errbuf);
+ if (p == NULL)
- }
-
- memset((char *)p, 0, sizeof(*p));
amt_read = fread((char *)&hdr, 1, sizeof(hdr), fp);
if (amt_read != sizeof(hdr)) {
amt_read = fread((char *)&hdr, 1, sizeof(hdr), fp);
if (amt_read != sizeof(hdr)) {