xref: /minix3/minix/include/net/gen/ip_io.h (revision 433d6423c39e34ec4b79c950597bb2d236f886be)
1*433d6423SLionel Sambuc /*
2*433d6423SLionel Sambuc server/ip/gen/ip_io.h
3*433d6423SLionel Sambuc */
4*433d6423SLionel Sambuc 
5*433d6423SLionel Sambuc #ifndef __SERVER__IP__GEN__IP_IO_H__
6*433d6423SLionel Sambuc #define __SERVER__IP__GEN__IP_IO_H__
7*433d6423SLionel Sambuc 
8*433d6423SLionel Sambuc typedef struct nwio_ipconf2
9*433d6423SLionel Sambuc {
10*433d6423SLionel Sambuc 	u32_t	nwic_flags;
11*433d6423SLionel Sambuc 	ipaddr_t nwic_ipaddr;
12*433d6423SLionel Sambuc 	ipaddr_t nwic_netmask;
13*433d6423SLionel Sambuc } nwio_ipconf2_t;
14*433d6423SLionel Sambuc 
15*433d6423SLionel Sambuc typedef struct nwio_ipconf
16*433d6423SLionel Sambuc {
17*433d6423SLionel Sambuc 	u32_t	nwic_flags;
18*433d6423SLionel Sambuc 	ipaddr_t nwic_ipaddr;
19*433d6423SLionel Sambuc 	ipaddr_t nwic_netmask;
20*433d6423SLionel Sambuc 	u16_t nwic_mtu;
21*433d6423SLionel Sambuc } nwio_ipconf_t;
22*433d6423SLionel Sambuc 
23*433d6423SLionel Sambuc #define NWIC_NOFLAGS		0x0
24*433d6423SLionel Sambuc #define NWIC_FLAGS		0x7
25*433d6423SLionel Sambuc #	define NWIC_IPADDR_SET		0x1
26*433d6423SLionel Sambuc #	define NWIC_NETMASK_SET		0x2
27*433d6423SLionel Sambuc #	define NWIC_MTU_SET		0x4
28*433d6423SLionel Sambuc 
29*433d6423SLionel Sambuc typedef struct nwio_ipopt
30*433d6423SLionel Sambuc {
31*433d6423SLionel Sambuc 	u32_t nwio_flags;
32*433d6423SLionel Sambuc 	ipaddr_t nwio_rem;
33*433d6423SLionel Sambuc 	ip_hdropt_t nwio_hdropt;
34*433d6423SLionel Sambuc 	u8_t nwio_tos;
35*433d6423SLionel Sambuc 	u8_t nwio_ttl;
36*433d6423SLionel Sambuc 	u8_t nwio_df;
37*433d6423SLionel Sambuc 	ipproto_t nwio_proto;
38*433d6423SLionel Sambuc } nwio_ipopt_t;
39*433d6423SLionel Sambuc 
40*433d6423SLionel Sambuc #define NWIO_NOFLAGS	0x0000l
41*433d6423SLionel Sambuc #define NWIO_ACC_MASK	0x0003l
42*433d6423SLionel Sambuc #	define NWIO_EXCL	0x00000001l
43*433d6423SLionel Sambuc #	define NWIO_SHARED	0x00000002l
44*433d6423SLionel Sambuc #	define NWIO_COPY	0x00000003l
45*433d6423SLionel Sambuc #define NWIO_LOC_MASK	0x0010l
46*433d6423SLionel Sambuc #	define NWIO_EN_LOC	0x00000010l
47*433d6423SLionel Sambuc #	define NWIO_DI_LOC	0x00100000l
48*433d6423SLionel Sambuc #define NWIO_BROAD_MASK	0x0020l
49*433d6423SLionel Sambuc #	define NWIO_EN_BROAD	0x00000020l
50*433d6423SLionel Sambuc #	define NWIO_DI_BROAD	0x00200000l
51*433d6423SLionel Sambuc #define NWIO_REM_MASK	0x0100l
52*433d6423SLionel Sambuc #	define NWIO_REMSPEC	0x00000100l
53*433d6423SLionel Sambuc #	define NWIO_REMANY	0x01000000l
54*433d6423SLionel Sambuc #define NWIO_PROTO_MASK	0x0200l
55*433d6423SLionel Sambuc #	define NWIO_PROTOSPEC	0x00000200l
56*433d6423SLionel Sambuc #	define NWIO_PROTOANY	0x02000000l
57*433d6423SLionel Sambuc #define NWIO_HDR_O_MASK	0x0400l
58*433d6423SLionel Sambuc #	define NWIO_HDR_O_SPEC	0x00000400l
59*433d6423SLionel Sambuc #	define NWIO_HDR_O_ANY	0x04000000l
60*433d6423SLionel Sambuc #define NWIO_RW_MASK	0x1000l
61*433d6423SLionel Sambuc #	define NWIO_RWDATONLY	0x00001000l
62*433d6423SLionel Sambuc #	define NWIO_RWDATALL	0x10000000l
63*433d6423SLionel Sambuc 
64*433d6423SLionel Sambuc #endif /* __SERVER__IP__GEN__IP_IO_H__ */
65*433d6423SLionel Sambuc 
66*433d6423SLionel Sambuc /*
67*433d6423SLionel Sambuc  * $PchId: ip_io.h,v 1.5 2001/03/12 22:17:25 philip Exp $
68*433d6423SLionel Sambuc  */
69