Expand PMF_FN_* macros.
[netbsd-mini2440.git] / sys / net / if_srt.h
blobe365e39b04a6ec33758464f42116bc8db7b49fd3
1 #ifndef _IF_SRT_H_1b91f8f1_
2 #define _IF_SRT_H_1b91f8f1_
4 /* $NetBSD: if_srt.h,v 1.2 2006/12/29 10:40:48 wiz Exp $ */
6 /* This file is in the public domain. */
8 #include <net/if.h> /* XXX for IFNAMSIZ */
9 #include <netinet/in.h> /* for in_addr/in6_addr */
11 struct srt_rt {
12 unsigned int inx;
13 int af;
14 union {
15 struct in_addr v4;
16 struct in6_addr v6;
17 } srcmatch;
18 unsigned int srcmask;
19 union {
20 struct ifnet *dstifp;
21 char dstifn[IFNAMSIZ];
22 } u;
23 union {
24 struct sockaddr_in sin;
25 struct sockaddr_in6 sin6;
26 struct sockaddr sa;
27 } dst;
30 /* Gets the number of slots in the rts array */
31 #define SRT_GETNRT _IOR('e',0,unsigned int)
33 /* Gets an rt entry, given the slot number in the inx field */
34 #define SRT_GETRT _IOWR('e',1,struct srt_rt)
36 /* Sets an rt entry; inx must be either in the array or one past it */
37 #define SRT_SETRT _IOW('e',2,struct srt_rt)
39 /* Delete an rt entry by index; shifts the rest down */
40 #define SRT_DELRT _IOW('e',3,unsigned int)
42 /* Set flag bits */
43 #define SRT_SFLAGS _IOW('e',4,unsigned int)
45 /* Get flag bits */
46 #define SRT_GFLAGS _IOR('e',5,unsigned int)
48 /* Atomically replace flag bits */
49 #define SRT_SGFLAGS _IOWR('e',6,unsigned int)
51 /* Do debugging tasks (not documented here - see the source) */
52 #define SRT_DEBUG _IOW('e',7,void *)
54 /* Flag bits for SRT_*FLAGS */
55 #define SSF_MTULOCK 0x00000001 /* don't auto-update MTU */
56 /* Some flags are global; some are per-unit. */
57 #define SSF_GLOBAL (0)
59 #endif