aboutsummaryrefslogtreecommitdiffstats
path: root/include
diff options
context:
space:
mode:
Diffstat (limited to 'include')
-rw-r--r--include/linux/netdevice.h4
-rw-r--r--include/linux/netfilter_ipv4/ipt_CLUSTERIP.h3
-rw-r--r--include/linux/netpoll.h34
-rw-r--r--include/linux/x25.h12
-rw-r--r--include/net/x25.h9
5 files changed, 47 insertions, 15 deletions
diff --git a/include/linux/netdevice.h b/include/linux/netdevice.h
index ba5d1236aa17..d6afd440cf7b 100644
--- a/include/linux/netdevice.h
+++ b/include/linux/netdevice.h
@@ -41,7 +41,7 @@
41struct divert_blk; 41struct divert_blk;
42struct vlan_group; 42struct vlan_group;
43struct ethtool_ops; 43struct ethtool_ops;
44struct netpoll; 44struct netpoll_info;
45 /* source back-compat hooks */ 45 /* source back-compat hooks */
46#define SET_ETHTOOL_OPS(netdev,ops) \ 46#define SET_ETHTOOL_OPS(netdev,ops) \
47 ( (netdev)->ethtool_ops = (ops) ) 47 ( (netdev)->ethtool_ops = (ops) )
@@ -468,7 +468,7 @@ struct net_device
468 unsigned char *haddr); 468 unsigned char *haddr);
469 int (*neigh_setup)(struct net_device *dev, struct neigh_parms *); 469 int (*neigh_setup)(struct net_device *dev, struct neigh_parms *);
470#ifdef CONFIG_NETPOLL 470#ifdef CONFIG_NETPOLL
471 struct netpoll *np; 471 struct netpoll_info *npinfo;
472#endif 472#endif
473#ifdef CONFIG_NET_POLL_CONTROLLER 473#ifdef CONFIG_NET_POLL_CONTROLLER
474 void (*poll_controller)(struct net_device *dev); 474 void (*poll_controller)(struct net_device *dev);
diff --git a/include/linux/netfilter_ipv4/ipt_CLUSTERIP.h b/include/linux/netfilter_ipv4/ipt_CLUSTERIP.h
index baa83e757156..d9bceedfb3dc 100644
--- a/include/linux/netfilter_ipv4/ipt_CLUSTERIP.h
+++ b/include/linux/netfilter_ipv4/ipt_CLUSTERIP.h
@@ -18,7 +18,6 @@ struct clusterip_config;
18struct ipt_clusterip_tgt_info { 18struct ipt_clusterip_tgt_info {
19 19
20 u_int32_t flags; 20 u_int32_t flags;
21 struct clusterip_config *config;
22 21
23 /* only relevant for new ones */ 22 /* only relevant for new ones */
24 u_int8_t clustermac[6]; 23 u_int8_t clustermac[6];
@@ -27,6 +26,8 @@ struct ipt_clusterip_tgt_info {
27 u_int16_t local_nodes[CLUSTERIP_MAX_NODES]; 26 u_int16_t local_nodes[CLUSTERIP_MAX_NODES];
28 enum clusterip_hashmode hash_mode; 27 enum clusterip_hashmode hash_mode;
29 u_int32_t hash_initval; 28 u_int32_t hash_initval;
29
30 struct clusterip_config *config;
30}; 31};
31 32
32#endif /*_IPT_CLUSTERIP_H_target*/ 33#endif /*_IPT_CLUSTERIP_H_target*/
diff --git a/include/linux/netpoll.h b/include/linux/netpoll.h
index c0d8b90c5202..bcd0ac33f592 100644
--- a/include/linux/netpoll.h
+++ b/include/linux/netpoll.h
@@ -16,14 +16,19 @@ struct netpoll;
16struct netpoll { 16struct netpoll {
17 struct net_device *dev; 17 struct net_device *dev;
18 char dev_name[16], *name; 18 char dev_name[16], *name;
19 int rx_flags;
20 void (*rx_hook)(struct netpoll *, int, char *, int); 19 void (*rx_hook)(struct netpoll *, int, char *, int);
21 void (*drop)(struct sk_buff *skb); 20 void (*drop)(struct sk_buff *skb);
22 u32 local_ip, remote_ip; 21 u32 local_ip, remote_ip;
23 u16 local_port, remote_port; 22 u16 local_port, remote_port;
24 unsigned char local_mac[6], remote_mac[6]; 23 unsigned char local_mac[6], remote_mac[6];
24};
25
26struct netpoll_info {
25 spinlock_t poll_lock; 27 spinlock_t poll_lock;
26 int poll_owner; 28 int poll_owner;
29 int rx_flags;
30 spinlock_t rx_lock;
31 struct netpoll *rx_np; /* netpoll that registered an rx_hook */
27}; 32};
28 33
29void netpoll_poll(struct netpoll *np); 34void netpoll_poll(struct netpoll *np);
@@ -39,22 +44,35 @@ void netpoll_queue(struct sk_buff *skb);
39#ifdef CONFIG_NETPOLL 44#ifdef CONFIG_NETPOLL
40static inline int netpoll_rx(struct sk_buff *skb) 45static inline int netpoll_rx(struct sk_buff *skb)
41{ 46{
42 return skb->dev->np && skb->dev->np->rx_flags && __netpoll_rx(skb); 47 struct netpoll_info *npinfo = skb->dev->npinfo;
48 unsigned long flags;
49 int ret = 0;
50
51 if (!npinfo || (!npinfo->rx_np && !npinfo->rx_flags))
52 return 0;
53
54 spin_lock_irqsave(&npinfo->rx_lock, flags);
55 /* check rx_flags again with the lock held */
56 if (npinfo->rx_flags && __netpoll_rx(skb))
57 ret = 1;
58 spin_unlock_irqrestore(&npinfo->rx_lock, flags);
59
60 return ret;
43} 61}
44 62
45static inline void netpoll_poll_lock(struct net_device *dev) 63static inline void netpoll_poll_lock(struct net_device *dev)
46{ 64{
47 if (dev->np) { 65 if (dev->npinfo) {
48 spin_lock(&dev->np->poll_lock); 66 spin_lock(&dev->npinfo->poll_lock);
49 dev->np->poll_owner = smp_processor_id(); 67 dev->npinfo->poll_owner = smp_processor_id();
50 } 68 }
51} 69}
52 70
53static inline void netpoll_poll_unlock(struct net_device *dev) 71static inline void netpoll_poll_unlock(struct net_device *dev)
54{ 72{
55 if (dev->np) { 73 if (dev->npinfo) {
56 spin_unlock(&dev->np->poll_lock); 74 dev->npinfo->poll_owner = -1;
57 dev->np->poll_owner = -1; 75 spin_unlock(&dev->npinfo->poll_lock);
58 } 76 }
59} 77}
60 78
diff --git a/include/linux/x25.h b/include/linux/x25.h
index 7531cfed5885..16d44931afa0 100644
--- a/include/linux/x25.h
+++ b/include/linux/x25.h
@@ -4,6 +4,8 @@
4 * History 4 * History
5 * mar/20/00 Daniela Squassoni Disabling/enabling of facilities 5 * mar/20/00 Daniela Squassoni Disabling/enabling of facilities
6 * negotiation. 6 * negotiation.
7 * apr/02/05 Shaun Pereira Selective sub address matching with
8 * call user data
7 */ 9 */
8 10
9#ifndef X25_KERNEL_H 11#ifndef X25_KERNEL_H
@@ -16,6 +18,9 @@
16#define SIOCX25GCALLUSERDATA (SIOCPROTOPRIVATE + 4) 18#define SIOCX25GCALLUSERDATA (SIOCPROTOPRIVATE + 4)
17#define SIOCX25SCALLUSERDATA (SIOCPROTOPRIVATE + 5) 19#define SIOCX25SCALLUSERDATA (SIOCPROTOPRIVATE + 5)
18#define SIOCX25GCAUSEDIAG (SIOCPROTOPRIVATE + 6) 20#define SIOCX25GCAUSEDIAG (SIOCPROTOPRIVATE + 6)
21#define SIOCX25SCUDMATCHLEN (SIOCPROTOPRIVATE + 7)
22#define SIOCX25CALLACCPTAPPRV (SIOCPROTOPRIVATE + 8)
23#define SIOCX25SENDCALLACCPT (SIOCPROTOPRIVATE + 9)
19 24
20/* 25/*
21 * Values for {get,set}sockopt. 26 * Values for {get,set}sockopt.
@@ -109,4 +114,11 @@ struct x25_causediag {
109 unsigned char diagnostic; 114 unsigned char diagnostic;
110}; 115};
111 116
117/*
118 * Further optional call user data match length selection
119 */
120struct x25_subaddr {
121 unsigned int cudmatchlength;
122};
123
112#endif 124#endif
diff --git a/include/net/x25.h b/include/net/x25.h
index 7a1ba5bbb868..8b39b98876e8 100644
--- a/include/net/x25.h
+++ b/include/net/x25.h
@@ -79,6 +79,8 @@ enum {
79#define X25_DEFAULT_PACKET_SIZE X25_PS128 /* Default Packet Size */ 79#define X25_DEFAULT_PACKET_SIZE X25_PS128 /* Default Packet Size */
80#define X25_DEFAULT_THROUGHPUT 0x0A /* Deafult Throughput */ 80#define X25_DEFAULT_THROUGHPUT 0x0A /* Deafult Throughput */
81#define X25_DEFAULT_REVERSE 0x00 /* Default Reverse Charging */ 81#define X25_DEFAULT_REVERSE 0x00 /* Default Reverse Charging */
82#define X25_DENY_ACCPT_APPRV 0x01 /* Default value */
83#define X25_ALLOW_ACCPT_APPRV 0x00 /* Control enabled */
82 84
83#define X25_SMODULUS 8 85#define X25_SMODULUS 8
84#define X25_EMODULUS 128 86#define X25_EMODULUS 128
@@ -94,7 +96,7 @@ enum {
94#define X25_FAC_CLASS_C 0x80 96#define X25_FAC_CLASS_C 0x80
95#define X25_FAC_CLASS_D 0xC0 97#define X25_FAC_CLASS_D 0xC0
96 98
97#define X25_FAC_REVERSE 0x01 99#define X25_FAC_REVERSE 0x01 /* also fast select */
98#define X25_FAC_THROUGHPUT 0x02 100#define X25_FAC_THROUGHPUT 0x02
99#define X25_FAC_PACKET_SIZE 0x42 101#define X25_FAC_PACKET_SIZE 0x42
100#define X25_FAC_WINDOW_SIZE 0x43 102#define X25_FAC_WINDOW_SIZE 0x43
@@ -134,8 +136,8 @@ struct x25_sock {
134 struct sock sk; 136 struct sock sk;
135 struct x25_address source_addr, dest_addr; 137 struct x25_address source_addr, dest_addr;
136 struct x25_neigh *neighbour; 138 struct x25_neigh *neighbour;
137 unsigned int lci; 139 unsigned int lci, cudmatchlength;
138 unsigned char state, condition, qbitincl, intflag; 140 unsigned char state, condition, qbitincl, intflag, accptapprv;
139 unsigned short vs, vr, va, vl; 141 unsigned short vs, vr, va, vl;
140 unsigned long t2, t21, t22, t23; 142 unsigned long t2, t21, t22, t23;
141 unsigned short fraglen; 143 unsigned short fraglen;
@@ -242,7 +244,6 @@ extern int x25_validate_nr(struct sock *, unsigned short);
242extern void x25_write_internal(struct sock *, int); 244extern void x25_write_internal(struct sock *, int);
243extern int x25_decode(struct sock *, struct sk_buff *, int *, int *, int *, int *, int *); 245extern int x25_decode(struct sock *, struct sk_buff *, int *, int *, int *, int *, int *);
244extern void x25_disconnect(struct sock *, int, unsigned char, unsigned char); 246extern void x25_disconnect(struct sock *, int, unsigned char, unsigned char);
245extern int x25_check_calluserdata(struct x25_calluserdata *,struct x25_calluserdata *);
246 247
247/* x25_timer.c */ 248/* x25_timer.c */
248extern void x25_start_heartbeat(struct sock *); 249extern void x25_start_heartbeat(struct sock *);