diff options
Diffstat (limited to 'include')
| -rw-r--r-- | include/linux/compat_ioctl.h | 32 | ||||
| -rw-r--r-- | include/linux/ipv6.h | 4 | ||||
| -rw-r--r-- | include/linux/rtnetlink.h | 47 | ||||
| -rw-r--r-- | include/linux/sysctl.h | 3 | ||||
| -rw-r--r-- | include/net/addrconf.h | 6 | ||||
| -rw-r--r-- | include/net/bluetooth/bluetooth.h | 3 | ||||
| -rw-r--r-- | include/net/bluetooth/hci.h | 10 | ||||
| -rw-r--r-- | include/net/bluetooth/hci_core.h | 14 | ||||
| -rw-r--r-- | include/net/bluetooth/rfcomm.h | 9 | ||||
| -rw-r--r-- | include/net/flow.h | 1 | ||||
| -rw-r--r-- | include/net/if_inet6.h | 5 | ||||
| -rw-r--r-- | include/net/ipv6.h | 4 | ||||
| -rw-r--r-- | include/net/irda/ircomm_tty.h | 3 | ||||
| -rw-r--r-- | include/net/ndisc.h | 11 | ||||
| -rw-r--r-- | include/net/neighbour.h | 10 | ||||
| -rw-r--r-- | include/net/sock.h | 38 |
16 files changed, 159 insertions, 41 deletions
diff --git a/include/linux/compat_ioctl.h b/include/linux/compat_ioctl.h index d87c417544bc..37c5a35ff237 100644 --- a/include/linux/compat_ioctl.h +++ b/include/linux/compat_ioctl.h @@ -260,6 +260,7 @@ COMPATIBLE_IOCTL(SIOCATMARK) COMPATIBLE_IOCTL(SIOCSIFLINK) COMPATIBLE_IOCTL(SIOCSIFENCAP) COMPATIBLE_IOCTL(SIOCGIFENCAP) +COMPATIBLE_IOCTL(SIOCSIFNAME) COMPATIBLE_IOCTL(SIOCSIFBR) COMPATIBLE_IOCTL(SIOCGIFBR) COMPATIBLE_IOCTL(SIOCSARP) @@ -685,3 +686,34 @@ COMPATIBLE_IOCTL(I2C_TENBIT) COMPATIBLE_IOCTL(I2C_PEC) COMPATIBLE_IOCTL(I2C_RETRIES) COMPATIBLE_IOCTL(I2C_TIMEOUT) +/* wireless */ +COMPATIBLE_IOCTL(SIOCSIWCOMMIT) +COMPATIBLE_IOCTL(SIOCGIWNAME) +COMPATIBLE_IOCTL(SIOCSIWNWID) +COMPATIBLE_IOCTL(SIOCGIWNWID) +COMPATIBLE_IOCTL(SIOCSIWFREQ) +COMPATIBLE_IOCTL(SIOCGIWFREQ) +COMPATIBLE_IOCTL(SIOCSIWMODE) +COMPATIBLE_IOCTL(SIOCGIWMODE) +COMPATIBLE_IOCTL(SIOCSIWSENS) +COMPATIBLE_IOCTL(SIOCGIWSENS) +COMPATIBLE_IOCTL(SIOCSIWRANGE) +COMPATIBLE_IOCTL(SIOCSIWPRIV) +COMPATIBLE_IOCTL(SIOCGIWPRIV) +COMPATIBLE_IOCTL(SIOCSIWSTATS) +COMPATIBLE_IOCTL(SIOCGIWSTATS) +COMPATIBLE_IOCTL(SIOCSIWAP) +COMPATIBLE_IOCTL(SIOCGIWAP) +COMPATIBLE_IOCTL(SIOCSIWSCAN) +COMPATIBLE_IOCTL(SIOCSIWRATE) +COMPATIBLE_IOCTL(SIOCGIWRATE) +COMPATIBLE_IOCTL(SIOCSIWRTS) +COMPATIBLE_IOCTL(SIOCGIWRTS) +COMPATIBLE_IOCTL(SIOCSIWFRAG) +COMPATIBLE_IOCTL(SIOCGIWFRAG) +COMPATIBLE_IOCTL(SIOCSIWTXPOW) +COMPATIBLE_IOCTL(SIOCGIWTXPOW) +COMPATIBLE_IOCTL(SIOCSIWRETRY) +COMPATIBLE_IOCTL(SIOCGIWRETRY) +COMPATIBLE_IOCTL(SIOCSIWPOWER) +COMPATIBLE_IOCTL(SIOCGIWPOWER) diff --git a/include/linux/ipv6.h b/include/linux/ipv6.h index 7f5a5c4280f7..ab97fc520921 100644 --- a/include/linux/ipv6.h +++ b/include/linux/ipv6.h @@ -143,6 +143,7 @@ struct ipv6_devconf { __s32 regen_max_retry; __s32 max_desync_factor; #endif + __s32 max_addresses; void *sysctl; }; @@ -158,13 +159,12 @@ enum { DEVCONF_RTR_SOLICITS, DEVCONF_RTR_SOLICIT_INTERVAL, DEVCONF_RTR_SOLICIT_DELAY, -#ifdef CONFIG_IPV6_PRIVACY DEVCONF_USE_TEMPADDR, DEVCONF_TEMP_VALID_LFT, DEVCONF_TEMP_PREFERED_LFT, DEVCONF_REGEN_MAX_RETRY, DEVCONF_MAX_DESYNC_FACTOR, -#endif + DEVCONF_MAX_ADDRESSES, DEVCONF_MAX }; diff --git a/include/linux/rtnetlink.h b/include/linux/rtnetlink.h index 4a26f207b5d7..6cfd6f2f4a98 100644 --- a/include/linux/rtnetlink.h +++ b/include/linux/rtnetlink.h @@ -44,7 +44,10 @@ #define RTM_DELTFILTER (RTM_BASE+29) #define RTM_GETTFILTER (RTM_BASE+30) -#define RTM_MAX (RTM_BASE+31) +#define RTM_NEWPREFIX (RTM_BASE+36) +#define RTM_GETPREFIX (RTM_BASE+38) + +#define RTM_MAX (RTM_BASE+39) /* Generic structure for encapsulation of optional route information. @@ -459,6 +462,34 @@ struct ifinfomsg unsigned ifi_change; /* IFF_* change mask */ }; +/******************************************************************** + * prefix information + ****/ + +struct prefixmsg +{ + unsigned char prefix_family; + int prefix_ifindex; + unsigned char prefix_type; + unsigned char prefix_len; + unsigned char prefix_flags; +}; + +enum +{ + PREFIX_UNSPEC, + PREFIX_ADDRESS, + PREFIX_CACHEINFO, +}; + +#define PREFIX_MAX PREFIX_CACHEINFO + +struct prefix_cacheinfo +{ + __u32 preferred_time; + __u32 valid_time; +}; + /* The struct should be in sync with struct net_device_stats */ struct rtnl_link_stats { @@ -558,9 +589,18 @@ enum IFLA_INET6_CONF, /* sysctl parameters */ IFLA_INET6_STATS, /* statistics */ IFLA_INET6_MCAST, /* MC things. What of them? */ + IFLA_INET6_CACHEINFO, /* time values and max reasm size */ }; -#define IFLA_INET6_MAX IFLA_INET6_MCAST +struct ifla_cacheinfo +{ + __u32 max_reasm_len; + __u32 tstamp; /* ipv6InterfaceTable updated timestamp */ + __u32 reachable_time; + __u32 retrans_time; +}; + +#define IFLA_INET6_MAX IFLA_INET6_CACHEINFO /***************************************************************** * Traffic control messages. @@ -611,10 +651,13 @@ enum #define RTMGRP_IPV6_IFADDR 0x100 #define RTMGRP_IPV6_MROUTE 0x200 #define RTMGRP_IPV6_ROUTE 0x400 +#define RTMGRP_IPV6_IFINFO 0x800 #define RTMGRP_DECnet_IFADDR 0x1000 #define RTMGRP_DECnet_ROUTE 0x4000 +#define RTMGRP_IPV6_PREFIX 0x20000 + /* End of information exported to user level */ #ifdef __KERNEL__ diff --git a/include/linux/sysctl.h b/include/linux/sysctl.h index c94fb1d1862a..de7b8b5bc523 100644 --- a/include/linux/sysctl.h +++ b/include/linux/sysctl.h @@ -418,7 +418,8 @@ enum { NET_IPV6_TEMP_VALID_LFT=12, NET_IPV6_TEMP_PREFERED_LFT=13, NET_IPV6_REGEN_MAX_RETRY=14, - NET_IPV6_MAX_DESYNC_FACTOR=15 + NET_IPV6_MAX_DESYNC_FACTOR=15, + NET_IPV6_MAX_ADDRESSES=16 }; /* /proc/sys/net/ipv6/icmp */ diff --git a/include/net/addrconf.h b/include/net/addrconf.h index 2537a6fc4bc0..92cbb7794cac 100644 --- a/include/net/addrconf.h +++ b/include/net/addrconf.h @@ -15,6 +15,8 @@ #define ADDR_CHECK_FREQUENCY (120*HZ) +#define IPV6_MAX_ADDRESSES 16 + struct prefix_info { __u8 type; __u8 length; @@ -50,10 +52,6 @@ struct prefix_info { extern void addrconf_init(void); extern void addrconf_cleanup(void); -extern int addrconf_notify(struct notifier_block *this, - unsigned long event, - void * data); - extern int addrconf_add_ifaddr(void *arg); extern int addrconf_del_ifaddr(void *arg); extern int addrconf_set_dstaddr(void *arg); diff --git a/include/net/bluetooth/bluetooth.h b/include/net/bluetooth/bluetooth.h index 429847a82f5f..99301bd8096a 100644 --- a/include/net/bluetooth/bluetooth.h +++ b/include/net/bluetooth/bluetooth.h @@ -47,7 +47,8 @@ #define BTPROTO_HCI 1 #define BTPROTO_SCO 2 #define BTPROTO_RFCOMM 3 -#define BTPROTO_BNEP 4 +#define BTPROTO_BNEP 4 +#define BTPROTO_CMTP 5 #define SOL_HCI 0 #define SOL_L2CAP 6 diff --git a/include/net/bluetooth/hci.h b/include/net/bluetooth/hci.h index 228a44322ee0..59523c39d6fb 100644 --- a/include/net/bluetooth/hci.h +++ b/include/net/bluetooth/hci.h @@ -408,6 +408,16 @@ struct inquiry_info { __u16 clock_offset; } __attribute__ ((packed)); +#define HCI_EV_INQUIRY_RESULT_WITH_RSSI 0x22 +struct inquiry_info_with_rssi { + bdaddr_t bdaddr; + __u8 pscan_rep_mode; + __u8 pscan_period_mode; + __u8 dev_class[3]; + __u16 clock_offset; + __u8 rssi; +} __attribute__ ((packed)); + #define HCI_EV_CONN_COMPLETE 0x03 struct hci_ev_conn_complete { __u8 status; diff --git a/include/net/bluetooth/hci_core.h b/include/net/bluetooth/hci_core.h index fd010a9dc75e..6a429873df9c 100644 --- a/include/net/bluetooth/hci_core.h +++ b/include/net/bluetooth/hci_core.h @@ -176,6 +176,12 @@ static inline void inquiry_cache_init(struct hci_dev *hdev) c->list = NULL; } +static inline int inquiry_cache_empty(struct hci_dev *hdev) +{ + struct inquiry_cache *c = &hdev->inq_cache; + return (c->list == NULL); +} + static inline long inquiry_cache_age(struct hci_dev *hdev) { struct inquiry_cache *c = &hdev->inq_cache; @@ -281,10 +287,12 @@ static inline void hci_conn_hold(struct hci_conn *conn) static inline void hci_conn_put(struct hci_conn *conn) { if (atomic_dec_and_test(&conn->refcnt)) { - if (conn->type == SCO_LINK) + if (conn->type == ACL_LINK) { + unsigned long timeo = (conn->out) ? + HCI_DISCONN_TIMEOUT : HCI_DISCONN_TIMEOUT * 2; + hci_conn_set_timer(conn, timeo); + } else hci_conn_set_timer(conn, HZ / 100); - else if (conn->out) - hci_conn_set_timer(conn, HCI_DISCONN_TIMEOUT); } } diff --git a/include/net/bluetooth/rfcomm.h b/include/net/bluetooth/rfcomm.h index 7d410fed2520..e022bfbb5166 100644 --- a/include/net/bluetooth/rfcomm.h +++ b/include/net/bluetooth/rfcomm.h @@ -167,8 +167,8 @@ struct rfcomm_session { int initiator; /* Default DLC parameters */ + int cfc; uint mtu; - uint credits; struct list_head dlcs; }; @@ -190,7 +190,7 @@ struct rfcomm_dlc { u8 mscex; uint mtu; - uint credits; + uint cfc; uint rx_credits; uint tx_credits; @@ -219,6 +219,11 @@ struct rfcomm_dlc { #define RFCOMM_MSCEX_RX 2 #define RFCOMM_MSCEX_OK (RFCOMM_MSCEX_TX + RFCOMM_MSCEX_RX) +/* CFC states */ +#define RFCOMM_CFC_UNKNOWN -1 +#define RFCOMM_CFC_DISABLED 0 +#define RFCOMM_CFC_ENABLED RFCOMM_MAX_CREDITS + extern struct task_struct *rfcomm_thread; extern unsigned long rfcomm_event; diff --git a/include/net/flow.h b/include/net/flow.h index 7ec259b5d632..1b495278975c 100644 --- a/include/net/flow.h +++ b/include/net/flow.h @@ -8,6 +8,7 @@ #define _NET_FLOW_H #include <linux/in6.h> +#include <asm/atomic.h> struct flowi { int oif; diff --git a/include/net/if_inet6.h b/include/net/if_inet6.h index 6dd6ebda5e6f..48280b138cb9 100644 --- a/include/net/if_inet6.h +++ b/include/net/if_inet6.h @@ -25,6 +25,10 @@ #define IF_RA_RCVD 0x20 #define IF_RS_SENT 0x10 +/* prefix flags */ +#define IF_PREFIX_ONLINK 0x01 +#define IF_PREFIX_AUTOCONF 0x02 + #ifdef __KERNEL__ struct inet6_ifaddr @@ -183,6 +187,7 @@ struct inet6_dev struct inet6_dev *next; struct ipv6_devconf cnf; struct ipv6_devstat stats; + unsigned long tstamp; /* ipv6InterfaceTable update timestamp */ }; extern struct ipv6_devconf ipv6_devconf; diff --git a/include/net/ipv6.h b/include/net/ipv6.h index 6ac444968292..1ad89018e99b 100644 --- a/include/net/ipv6.h +++ b/include/net/ipv6.h @@ -401,12 +401,8 @@ extern int ipv6_getsockopt(struct sock *sk, int level, extern void ipv6_packet_init(void); -extern void ipv6_netdev_notif_init(void); - extern void ipv6_packet_cleanup(void); -extern void ipv6_netdev_notif_cleanup(void); - extern int ipv6_recv_error(struct sock *sk, struct msghdr *msg, int len); extern void ipv6_icmp_error(struct sock *sk, struct sk_buff *skb, int err, u16 port, u32 info, u8 *payload); diff --git a/include/net/irda/ircomm_tty.h b/include/net/irda/ircomm_tty.h index b1f19269c026..d0e60ddf43a0 100644 --- a/include/net/irda/ircomm_tty.h +++ b/include/net/irda/ircomm_tty.h @@ -122,6 +122,9 @@ void ircomm_tty_stop(struct tty_struct *tty); void ircomm_tty_check_modem_status(struct ircomm_tty_cb *self); extern void ircomm_tty_change_speed(struct ircomm_tty_cb *self); +extern int ircomm_tty_tiocmget(struct tty_struct *tty, struct file *file); +extern int ircomm_tty_tiocmset(struct tty_struct *tty, struct file *file, + unsigned int set, unsigned int clear); extern int ircomm_tty_ioctl(struct tty_struct *tty, struct file *file, unsigned int cmd, unsigned long arg); extern void ircomm_tty_set_termios(struct tty_struct *tty, diff --git a/include/net/ndisc.h b/include/net/ndisc.h index d364fc636912..95684d3363c1 100644 --- a/include/net/ndisc.h +++ b/include/net/ndisc.h @@ -98,6 +98,17 @@ extern int igmp6_event_report(struct sk_buff *skb); extern void igmp6_cleanup(void); +#ifdef CONFIG_SYSCTL +extern int ndisc_ifinfo_sysctl_change(ctl_table *ctl, + int write, + struct file * filp, + void __user *buffer, + size_t *lenp); +#endif + +extern void inet6_ifinfo_notify(int event, + struct inet6_dev *idev); + static inline struct neighbour * ndisc_get_neigh(struct net_device *dev, struct in6_addr *addr) { diff --git a/include/net/neighbour.h b/include/net/neighbour.h index 24bee28fd7fb..e016389694a8 100644 --- a/include/net/neighbour.h +++ b/include/net/neighbour.h @@ -47,6 +47,9 @@ #include <linux/skbuff.h> #include <linux/err.h> +#ifdef CONFIG_SYSCTL +#include <linux/sysctl.h> +#endif #define NUD_IN_TIMER (NUD_INCOMPLETE|NUD_DELAY|NUD_PROBE) #define NUD_VALID (NUD_PERMANENT|NUD_NOARP|NUD_REACHABLE|NUD_PROBE|NUD_STALE|NUD_DELAY) @@ -206,8 +209,11 @@ extern int neigh_add(struct sk_buff *skb, struct nlmsghdr *nlh, void *arg); extern int neigh_delete(struct sk_buff *skb, struct nlmsghdr *nlh, void *arg); extern void neigh_app_ns(struct neighbour *n); -extern int neigh_sysctl_register(struct net_device *dev, struct neigh_parms *p, - int p_id, int pdev_id, char *p_name); +extern int neigh_sysctl_register(struct net_device *dev, + struct neigh_parms *p, + int p_id, int pdev_id, + char *p_name, + proc_handler *proc_handler); extern void neigh_sysctl_unregister(struct neigh_parms *p); /* diff --git a/include/net/sock.h b/include/net/sock.h index e2dc8c473482..7b38c08f0f64 100644 --- a/include/net/sock.h +++ b/include/net/sock.h @@ -304,7 +304,24 @@ static __inline__ int __sk_del_node_init(struct sock *sk) return 0; } -static inline void __sock_put(struct sock *sk); +/* Grab socket reference count. This operation is valid only + when sk is ALREADY grabbed f.e. it is found in hash table + or a list and the lookup is made under lock preventing hash table + modifications. + */ + +static inline void sock_hold(struct sock *sk) +{ + atomic_inc(&sk->sk_refcnt); +} + +/* Ungrab socket in the context, which assumes that socket refcnt + cannot hit zero, f.e. it is true in context of any socketcall. + */ +static inline void __sock_put(struct sock *sk) +{ + atomic_dec(&sk->sk_refcnt); +} static __inline__ int sk_del_node_init(struct sock *sk) { @@ -722,25 +739,6 @@ static inline void sk_filter_charge(struct sock *sk, struct sk_filter *fp) * use separate SMP lock, so that they are prone too. */ -/* Grab socket reference count. This operation is valid only - when sk is ALREADY grabbed f.e. it is found in hash table - or a list and the lookup is made under lock preventing hash table - modifications. - */ - -static inline void sock_hold(struct sock *sk) -{ - atomic_inc(&sk->sk_refcnt); -} - -/* Ungrab socket in the context, which assumes that socket refcnt - cannot hit zero, f.e. it is true in context of any socketcall. - */ -static inline void __sock_put(struct sock *sk) -{ - atomic_dec(&sk->sk_refcnt); -} - /* Ungrab socket and destroy it, if it was the last reference. */ static inline void sock_put(struct sock *sk) { |
