mirror of
https://github.com/wangyu-/udp2raw.git
synced 2025-02-07 23:59:36 +08:00
update pcap wrapper
This commit is contained in:
parent
d24c96a400
commit
7df9c7f38b
@ -3,6 +3,7 @@
|
|||||||
#include <assert.h>
|
#include <assert.h>
|
||||||
#include <stdio.h>
|
#include <stdio.h>
|
||||||
int (*pcap_loop )(pcap_t *, int, pcap_handler, u_char *);
|
int (*pcap_loop )(pcap_t *, int, pcap_handler, u_char *);
|
||||||
|
int (*pcap_breakloop )(pcap_t *);
|
||||||
|
|
||||||
pcap_t* (*pcap_create)(const char *, char *);
|
pcap_t* (*pcap_create)(const char *, char *);
|
||||||
|
|
||||||
@ -84,6 +85,7 @@ int init_pcap()
|
|||||||
assert(wpcap!=0);
|
assert(wpcap!=0);
|
||||||
|
|
||||||
EXPORT_FUN(pcap_loop);
|
EXPORT_FUN(pcap_loop);
|
||||||
|
EXPORT_FUN(pcap_breakloop);
|
||||||
EXPORT_FUN(pcap_create);
|
EXPORT_FUN(pcap_create);
|
||||||
EXPORT_FUN(pcap_set_snaplen);
|
EXPORT_FUN(pcap_set_snaplen);
|
||||||
EXPORT_FUN(pcap_set_promisc);
|
EXPORT_FUN(pcap_set_promisc);
|
||||||
|
@ -83,6 +83,8 @@ typedef void (*pcap_handler)(u_char *, const struct pcap_pkthdr *,
|
|||||||
|
|
||||||
extern int (*pcap_loop )(pcap_t *, int, pcap_handler, u_char *);
|
extern int (*pcap_loop )(pcap_t *, int, pcap_handler, u_char *);
|
||||||
|
|
||||||
|
extern int (*pcap_breakloop )(pcap_t *);
|
||||||
|
|
||||||
extern pcap_t* (*pcap_create)(const char *, char *);
|
extern pcap_t* (*pcap_create)(const char *, char *);
|
||||||
|
|
||||||
extern int (*pcap_set_snaplen) (pcap_t *, int);
|
extern int (*pcap_set_snaplen) (pcap_t *, int);
|
||||||
|
Loading…
x
Reference in New Issue
Block a user