-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathmain.h
45 lines (33 loc) · 892 Bytes
/
main.h
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
#define APPNAME "Pipe2Cap"
#define VERSION "0.2.0"
#define DEVNAME "Mr_Ethergrouik"
#define RELEASEDATE "20160222"
#include <stdio.h>
#include <fcntl.h>
#include <stdlib.h>
#include "pcap.h"
#include <assert.h>
#include <sys/time.h>
#include <unistd.h>
#ifdef __WIN32__
#include <io.h>
#include <windows.h>
#else
#include <string.h>
#endif // __WIN32__
#define MAX_MTU 65535
#ifdef __WIN32__
int read_stream (int fd, void *d, int iLength );
#endif // __WIN32__
void print_packet( unsigned char * pkt_data, int iLength);
void iface_listing(void);
int pcap_send( pcap_t *fp, unsigned char *pkt, int iLength );
int show_status( int status, int iFramesCpt );
void usage( void );
typedef struct stProject{
int iIfaceId;
char *pIfaceName;
pcap_t *pcap_handle_adapter;
int iPcapLoopTimer;
}stProject;
stProject *pstProject;