* add p cc
[mascara-docs.git] / i386 / linux / linux-2.3.21 / include / net / if_inet6.h
blobae4134d76d9bb413a2a83cd00c1e0a0925ecf260
1 /*
2 * inet6 interface/address list definitions
3 * Linux INET6 implementation
5 * Authors:
6 * Pedro Roque <roque@di.fc.ul.pt>
9 * This program is free software; you can redistribute it and/or
10 * modify it under the terms of the GNU General Public License
11 * as published by the Free Software Foundation; either version
12 * 2 of the License, or (at your option) any later version.
15 #ifndef _NET_IF_INET6_H
16 #define _NET_IF_INET6_H
18 #define IF_RA_RCVD 0x20
19 #define IF_RS_SENT 0x10
21 #ifdef __KERNEL__
23 struct inet6_ifaddr
25 struct in6_addr addr;
26 __u32 prefix_len;
28 __u32 valid_lft;
29 __u32 prefered_lft;
30 unsigned long tstamp;
31 atomic_t refcnt;
32 spinlock_t lock;
34 __u8 probes;
35 __u8 flags;
37 __u16 scope;
39 struct timer_list timer;
41 struct inet6_dev *idev;
43 struct inet6_ifaddr *lst_next; /* next addr in addr_lst */
44 struct inet6_ifaddr *if_next; /* next addr in inet6_dev */
46 int dead;
49 struct ipv6_mc_socklist
51 struct in6_addr addr;
52 int ifindex;
53 struct ipv6_mc_socklist *next;
56 #define MAF_TIMER_RUNNING 0x01
57 #define MAF_LAST_REPORTER 0x02
58 #define MAF_LOADED 0x04
60 struct ifmcaddr6
62 struct in6_addr mca_addr;
63 struct inet6_dev *idev;
64 struct ifmcaddr6 *next;
65 struct timer_list mca_timer;
66 unsigned mca_flags;
67 atomic_t mca_users;
70 #define IFA_HOST IPV6_ADDR_LOOPBACK
71 #define IFA_LINK IPV6_ADDR_LINKLOCAL
72 #define IFA_SITE IPV6_ADDR_SITELOCAL
73 #define IFA_GLOBAL 0x0000U
75 struct ipv6_devconf
77 int forwarding;
78 int hop_limit;
79 int mtu6;
80 int accept_ra;
81 int accept_redirects;
82 int autoconf;
83 int dad_transmits;
84 int rtr_solicits;
85 int rtr_solicit_interval;
86 int rtr_solicit_delay;
88 void *sysctl;
91 struct inet6_dev
93 struct net_device *dev;
95 struct inet6_ifaddr *addr_list;
96 struct ifmcaddr6 *mc_list;
97 rwlock_t lock;
98 atomic_t refcnt;
99 __u32 if_flags;
100 int dead;
102 struct neigh_parms *nd_parms;
103 struct inet6_dev *next;
104 struct ipv6_devconf cnf;
107 extern struct ipv6_devconf ipv6_devconf;
109 extern __inline__ void ipv6_eth_mc_map(struct in6_addr *addr, char *buf)
112 * +-------+-------+-------+-------+-------+-------+
113 * | 33 | 33 | DST13 | DST14 | DST15 | DST16 |
114 * +-------+-------+-------+-------+-------+-------+
117 buf[0]= 0x33;
118 buf[1]= 0x33;
120 memcpy(buf + 2, &addr->s6_addr32[3], sizeof(__u32));
122 #endif
123 #endif