aboutsummaryrefslogtreecommitdiffstats
path: root/include/net/x25.h
diff options
context:
space:
mode:
authorAndrew Hendry <andrew.hendry@gmail.com>2007-02-08 13:34:02 -0800
committerDavid S. Miller <davem@davemloft.net>2007-02-08 13:34:02 -0800
commit95a9dc4390c8215d922e0ca2ebb95279261fe795 (patch)
tree8b4be0c3a672ebd30d2777227e9a466819483ab8 /include/net/x25.h
parent[XFRM]: xfrm_migrate() needs exporting to modules. (diff)
downloadlinux-dev-95a9dc4390c8215d922e0ca2ebb95279261fe795.tar.xz
linux-dev-95a9dc4390c8215d922e0ca2ebb95279261fe795.zip
[X.25]: Add call forwarding
Adds call forwarding to X.25, allowing it to operate like an X.25 router. Useful if one needs to manipulate X.25 traffic with tools like tc. This is an update/cleanup based off a patch submitted by Daniel Ferenci a few years ago. Thanks Alan for the feedback. Added the null check to the clones. Moved the skb_clone's into the forwarding functions. Worked ok with Cisco XoT, linux X.25 back to back, and some old NTUs/PADs. Signed-off-by: Andrew Hendry <andrew.hendry@gmail.com> Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'include/net/x25.h')
-rw-r--r--include/net/x25.h17
1 files changed, 17 insertions, 0 deletions
diff --git a/include/net/x25.h b/include/net/x25.h
index e47fe440d9d7..3b1190514d92 100644
--- a/include/net/x25.h
+++ b/include/net/x25.h
@@ -161,6 +161,14 @@ struct x25_sock {
unsigned long vc_facil_mask; /* inc_call facilities mask */
};
+struct x25_forward {
+ struct list_head node;
+ unsigned int lci;
+ struct net_device *dev1;
+ struct net_device *dev2;
+ atomic_t refcnt;
+};
+
static inline struct x25_sock *x25_sk(const struct sock *sk)
{
return (struct x25_sock *)sk;
@@ -198,6 +206,13 @@ extern int x25_negotiate_facilities(struct sk_buff *, struct sock *,
struct x25_dte_facilities *);
extern void x25_limit_facilities(struct x25_facilities *, struct x25_neigh *);
+/* x25_forward.c */
+extern void x25_clear_forward_by_lci(unsigned int lci);
+extern void x25_clear_forward_by_dev(struct net_device *);
+extern int x25_forward_data(int, struct x25_neigh *, struct sk_buff *);
+extern int x25_forward_call(struct x25_address *, struct x25_neigh *,
+ struct sk_buff *, int);
+
/* x25_in.c */
extern int x25_process_rx_frame(struct sock *, struct sk_buff *);
extern int x25_backlog_rcv(struct sock *, struct sk_buff *);
@@ -282,6 +297,8 @@ extern struct hlist_head x25_list;
extern rwlock_t x25_list_lock;
extern struct list_head x25_route_list;
extern rwlock_t x25_route_list_lock;
+extern struct list_head x25_forward_list;
+extern rwlock_t x25_forward_list_lock;
extern int x25_proc_init(void);
extern void x25_proc_exit(void);