Lines Matching refs:pd

124 static void show_dlts_and_exit(const char *device, pcap_t *pd) __attribute__((noreturn));
369 static pcap_t *pd; variable
389 pcap_t *pd; member
395 show_tstamp_types_and_exit(const char *device, pcap_t *pd) in show_tstamp_types_and_exit() argument
402 n_tstamp_types = pcap_list_tstamp_types(pd, &tstamp_types); in show_tstamp_types_and_exit()
404 error("%s", pcap_geterr(pd)); in show_tstamp_types_and_exit()
428 show_dlts_and_exit(const char *device, pcap_t *pd) in show_dlts_and_exit() argument
434 n_dlts = pcap_list_datalinks(pd, &dlts); in show_dlts_and_exit()
436 error("%s", pcap_geterr(pd)); in show_dlts_and_exit()
1222 pd = pcap_open_offline(RFileName, ebuf); in main()
1223 if (pd == NULL) in main()
1225 dlt = pcap_datalink(pd); in main()
1264 pd = pcap_create(device, ebuf); in main()
1265 if (pd == NULL) in main()
1269 show_tstamp_types_and_exit(device, pd); in main()
1274 if (pcap_can_set_rfmon(pd) == 1) in main()
1278 status = pcap_set_snaplen(pd, snaplen); in main()
1282 status = pcap_set_promisc(pd, !pflag); in main()
1287 status = pcap_set_rfmon(pd, 1); in main()
1292 status = pcap_set_timeout(pd, 1000); in main()
1297 status = pcap_set_buffer_size(pd, Bflag); in main()
1304 status = pcap_set_tstamp_type(pd, jflag); in main()
1310 status = pcap_activate(pd); in main()
1315 cp = pcap_geterr(pd); in main()
1331 cp = pcap_geterr(pd); in main()
1344 status = pcap_setdirection(pd, Pflag); in main()
1347 device, pcap_geterr(pd)); in main()
1352 pd = pcap_open_live(device, snaplen, !pflag, 1000, ebuf); in main()
1353 if (pd == NULL) in main()
1367 if(pcap_setbuff(pd, Bflag)==-1){ in main()
1368 error("%s", pcap_geterr(pd)); in main()
1372 show_dlts_and_exit(device, pd); in main()
1375 if (pcap_set_datalink(pd, gndo->ndo_dlt) < 0) in main()
1376 error("%s", pcap_geterr(pd)); in main()
1383 if (gndo->ndo_dlt != pcap_datalink(pd)) { in main()
1392 i = pcap_snapshot(pd); in main()
1408 if (pcap_compile(pd, &fcode, cmdbuf, Oflag, netmask) < 0) in main()
1409 error("%s", pcap_geterr(pd)); in main()
1412 pcap_close(pd); in main()
1479 if (pcap_setfilter(pd, &fcode) < 0) in main()
1480 error("%s", pcap_geterr(pd)); in main()
1495 p = pcap_dump_open(pd, dumpinfo.CurrentFileName); in main()
1501 error("%s", pcap_geterr(pd)); in main()
1505 dumpinfo.pd = pd; in main()
1517 type = pcap_datalink(pd); in main()
1561 dlt = pcap_datalink(pd); in main()
1575 status = pcap_loop(pd, cnt, callback, pcap_userdata); in main()
1604 program_name, pcap_geterr(pd)); in main()
1613 pcap_close(pd); in main()
1618 pd = pcap_open_offline(RFileName, ebuf); in main()
1619 if (pd == NULL) in main()
1621 new_dlt = pcap_datalink(pd); in main()
1635 if (pcap_compile(pd, &fcode, cmdbuf, Oflag, netmask) < 0) in main()
1636 error("%s", pcap_geterr(pd)); in main()
1637 if (pcap_setfilter(pd, &fcode) < 0) in main()
1638 error("%s", pcap_geterr(pd)); in main()
1667 pcap_breakloop(pd); in cleanup()
1675 if (pd != NULL && pcap_file(pd) == NULL) { in cleanup()
1711 if (pcap_stats(pd, &stat) < 0) { in info()
1712 (void)fprintf(stderr, "pcap_stats: %s\n", pcap_geterr(pd)); in info()
1863 dump_info->p = pcap_dump_open(dump_info->pd, dump_info->CurrentFileName); in dump_packet_and_trunc()
1869 error("%s", pcap_geterr(pd)); in dump_packet_and_trunc()
1901 dump_info->p = pcap_dump_open(dump_info->pd, dump_info->CurrentFileName); in dump_packet_and_trunc()
1903 error("%s", pcap_geterr(pd)); in dump_packet_and_trunc()
2087 if (infodelay == 0 && pcap_stats(pd, &stat) >= 0) in verbose_stats_dump()
2095 if (infodelay == 0 && pcap_stats(pd, &stat) >= 0) in verbose_stats_dump()