summaryrefslogtreecommitdiff
path: root/include/net
diff options
context:
space:
mode:
authorDavid S. Miller <davem@nuts.ninka.net>2002-09-18 02:14:02 -0700
committerDavid S. Miller <davem@nuts.ninka.net>2002-09-18 02:14:02 -0700
commitc2edf82620682e0384b7d95fea359b082a626f7e (patch)
treed39fcabf56d9cb37c58059f375169c1e4c6875e3 /include/net
parent5f761bd3d04f12d0cf163544b8ef09677a0b0c2e (diff)
parente5e1cba9ef21644d4f550620717c835b430f2b26 (diff)
Merge http://linux-ham.bkbits.net/linux-2.5
into nuts.ninka.net:/home/davem/src/BK/ham-2.5
Diffstat (limited to 'include/net')
-rw-r--r--include/net/ax25.h25
1 files changed, 20 insertions, 5 deletions
diff --git a/include/net/ax25.h b/include/net/ax25.h
index 334127932384..c34da24f1902 100644
--- a/include/net/ax25.h
+++ b/include/net/ax25.h
@@ -3,11 +3,14 @@
*
* Alan Cox (GW4PTS) 10/11/93
*/
-
#ifndef _AX25_H
#define _AX25_H
+
#include <linux/config.h>
#include <linux/ax25.h>
+#include <linux/spinlock.h>
+#include <linux/timer.h>
+#include <asm/atomic.h>
#define AX25_T1CLAMPLO 1
#define AX25_T1CLAMPHI (30 * HZ)
@@ -66,6 +69,8 @@
#define AX25_UA 0x63 /* Unnumbered acknowledge */
#define AX25_FRMR 0x87 /* Frame reject */
#define AX25_UI 0x03 /* Unnumbered information */
+#define AX25_XID 0xaf /* Exchange information */
+#define AX25_TEST 0xe3 /* Test */
#define AX25_PF 0x10 /* Poll/final bit for standard AX.25 */
#define AX25_EPF 0x01 /* Poll/final bit for extended AX.25 */
@@ -147,10 +152,12 @@ typedef struct {
typedef struct ax25_route {
struct ax25_route *next;
+ atomic_t ref;
ax25_address callsign;
- struct net_device *dev;
+ struct net_device *dev;
ax25_digi *digipeat;
char ip_mode;
+ struct timer_list timer;
} ax25_route;
typedef struct {
@@ -197,11 +204,12 @@ typedef struct ax25_cb {
#define ax25_sk(__sk) ((ax25_cb *)(__sk)->protinfo)
/* af_ax25.c */
-extern ax25_cb *volatile ax25_list;
+extern ax25_cb *ax25_list;
+extern spinlock_t ax25_list_lock;
extern void ax25_free_cb(ax25_cb *);
extern void ax25_insert_socket(ax25_cb *);
struct sock *ax25_find_listener(ax25_address *, int, struct net_device *, int);
-struct sock *ax25_find_socket(ax25_address *, ax25_address *, int);
+struct sock *ax25_get_socket(ax25_address *, ax25_address *, int);
extern ax25_cb *ax25_find_cb(ax25_address *, ax25_address *, ax25_digi *, struct net_device *);
extern struct sock *ax25_addr_match(ax25_address *);
extern void ax25_send_to_raw(struct sock *, struct sk_buff *, int);
@@ -224,6 +232,7 @@ extern void ax25_digi_invert(ax25_digi *, ax25_digi *);
/* ax25_dev.c */
extern ax25_dev *ax25_dev_list;
+extern spinlock_t ax25_dev_lock;
extern ax25_dev *ax25_dev_ax25dev(struct net_device *);
extern ax25_dev *ax25_addr_ax25dev(ax25_address *);
extern void ax25_dev_device_up(struct net_device *);
@@ -286,10 +295,16 @@ extern void ax25_rt_device_down(struct net_device *);
extern int ax25_rt_ioctl(unsigned int, void *);
extern int ax25_rt_get_info(char *, char **, off_t, int);
extern int ax25_rt_autobind(ax25_cb *, ax25_address *);
-extern ax25_route *ax25_rt_find_route(ax25_address *, struct net_device *);
+extern ax25_route *ax25_rt_find_route(ax25_route *, ax25_address *,
+ struct net_device *);
extern struct sk_buff *ax25_rt_build_path(struct sk_buff *, ax25_address *, ax25_address *, ax25_digi *);
extern void ax25_rt_free(void);
+static inline void ax25_put_route(ax25_route *ax25_rt)
+{
+ atomic_dec(&ax25_rt->ref);
+}
+
/* ax25_std_in.c */
extern int ax25_std_frame_in(ax25_cb *, struct sk_buff *, int);