-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy patheth_util.h
executable file
·62 lines (43 loc) · 1.32 KB
/
eth_util.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
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
/*
Noel Burton-Krahn <[email protected]>
Nov 14, 2002
Copyright 2002, Burton-Krahn, Inc
This code is provided for evaluation purposes only, and no portion
of it may be used, reproduced, or redistributed without the express
written consent of Burton-Krahn, Inc.
This code has no warranty of any kind.
*/
#include "sock.h"
#include "netpkt_inet.h"
#define MAX_PKT_LEN 4096
typedef union {
char a[4];
int i;
} ipaddr_t;
typedef union {
char a[6];
} ethaddr_t;
char *
dot_addr_str(const unsigned char *addr, char *buf, int buflen,
int dots, char *templ, char *sep);
#define ETH_ADDR_STR_MAX (6*2+5+1)
char *
eth_addr_str(const void *addr, char *buf, int buflen);
#define IP_ADDR_STR_MAX (6*2+5+1)
char *
ip_addr_str(const void *addr, char *buf, int buflen);
/* from tcpdump-3.3 */
int
in_cksum(const netpkt_ip *ip);
#define ETH_TYPE_STR_MAX (100)
char *
eth_type_str(unsigned int ether_type, char *buf, int buflen);
/*
Noel Burton-Krahn <[email protected]>
Nov 14, 2002
Copyright 2002, Burton-Krahn, Inc
This code is provided for evaluation purposes only, and no portion
of it may be used, reproduced, or redistributed without the express
written consent of Burton-Krahn, Inc.
This code has no warranty of any kind.
*/