-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathstp.h
More file actions
51 lines (41 loc) · 1.17 KB
/
stp.h
File metadata and controls
51 lines (41 loc) · 1.17 KB
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
/*
* SO2 Transport Protocol
*/
#ifndef STP_H_
#define STP_H_ 1
#ifdef __cplusplus
extern "C" {
#endif
#include <linux/types.h>
/* STP reuses the defines of ancient protocols like Econet and Xerox PUP
* because adding a new protocol would involve patching the kernel, which we
* don't want to do and besides that, they are probably not used anymore.
*/
#define AF_STP 19
#define PF_STP AF_STP
#define ETH_P_STP 0x0a00
struct stp_hdr {
__be16 dst; /* Destination port */
__be16 src; /* Source port */
__be16 len; /* Total length, including header */
__u8 flags; /* */
__u8 csum; /* xor of all bytes, including header */
};
struct sockaddr_stp {
unsigned short sas_family; /* Always AF_STP */
int sas_ifindex; /* Interface index */
__be16 sas_port; /* Port */
__u8 sas_addr[6]; /* MAC address */
};
/* STP protocol name; used as identifier in /proc/net/protocols */
#define STP_PROTO_NAME "STP"
/*
* STP uses proc interface to communicate statistical information to
* user space (in /proc/net/).
*/
#define STP_PROC_NET_FILENAME "stp_stats"
#define STP_PROC_FULL_FILENAME "/proc/net/" STP_PROC_NET_FILENAME
#ifdef __cplusplus
}
#endif
#endif /* STP_H_ */