patch-2.1.44 linux/include/net/netrom.h

Next file: linux/include/net/rose.h
Previous file: linux/include/net/lapb.h
Back to the patch index
Back to the overall index

diff -u --recursive --new-file v2.1.43/linux/include/net/netrom.h linux/include/net/netrom.h
@@ -8,8 +8,6 @@
 #define _NETROM_H 
 #include <linux/netrom.h>
 
-#define	NR_SLOWHZ			10	/* Run timing at 1/10 second */
-
 #define	NR_NETWORK_LEN			15
 #define	NR_TRANSPORT_LEN		5
 
@@ -40,17 +38,17 @@
 #define	NR_COND_PEER_RX_BUSY		0x04
 #define	NR_COND_OWN_RX_BUSY		0x08
 
-#define NR_DEFAULT_T1			(120 * NR_SLOWHZ)	/* Outstanding frames - 120 seconds */
-#define NR_DEFAULT_T2			(5   * NR_SLOWHZ)	/* Response delay     - 5 seconds */
-#define NR_DEFAULT_N2			3			/* Number of Retries - 3 */
-#define	NR_DEFAULT_T4			(180 * NR_SLOWHZ)	/* Busy Delay - 180 seconds */
-#define	NR_DEFAULT_IDLE			(20* 60 * NR_SLOWHZ)	/* No Activuty Timeout - 900 seconds*/
-#define	NR_DEFAULT_WINDOW		4			/* Default Window Size - 4 */
-#define	NR_DEFAULT_OBS			6			/* Default Obsolescence Count - 6 */
-#define	NR_DEFAULT_QUAL			10			/* Default Neighbour Quality - 10 */
-#define	NR_DEFAULT_TTL			16			/* Default Time To Live - 16 */
-#define	NR_DEFAULT_ROUTING		1			/* Is routing enabled ? */
-#define	NR_DEFAULT_FAILS		2			/* Link fails until route fails */
+#define NR_DEFAULT_T1			(120 * HZ)	/* Outstanding frames - 120 seconds */
+#define NR_DEFAULT_T2			(5   * HZ)	/* Response delay     - 5 seconds */
+#define NR_DEFAULT_N2			3		/* Number of Retries - 3 */
+#define	NR_DEFAULT_T4			(180 * HZ)	/* Busy Delay - 180 seconds */
+#define	NR_DEFAULT_IDLE			(0 * 60 * HZ)	/* No Activity Timeout - none */
+#define	NR_DEFAULT_WINDOW		4		/* Default Window Size - 4 */
+#define	NR_DEFAULT_OBS			6		/* Default Obsolescence Count - 6 */
+#define	NR_DEFAULT_QUAL			10		/* Default Neighbour Quality - 10 */
+#define	NR_DEFAULT_TTL			16		/* Default Time To Live - 16 */
+#define	NR_DEFAULT_ROUTING		1		/* Is routing enabled ? */
+#define	NR_DEFAULT_FAILS		2		/* Link fails until route fails */
 
 #define NR_MODULUS 			256
 #define NR_MAX_WINDOW_SIZE		127			/* Maximum Window Allowable - 127 */
@@ -64,9 +62,12 @@
 	unsigned char		state, condition, bpqext, window;
 	unsigned short		vs, vr, va, vl;
 	unsigned char		n2, n2count;
-	unsigned short		t1, t2, t4, idle;
-	unsigned short		t1timer, t2timer, t4timer, idletimer;
+	unsigned long		t1, t2, t4, idle;
 	unsigned short		fraglen;
+	struct timer_list	t1timer;
+	struct timer_list	t2timer;
+	struct timer_list	t4timer;
+	struct timer_list	idletimer;
 	struct sk_buff_head	ack_queue;
 	struct sk_buff_head	reseq_queue;
 	struct sk_buff_head	frag_queue;
@@ -77,6 +78,7 @@
 	struct nr_neigh *next;
 	ax25_address    callsign;
 	ax25_digi       *digipeat;
+	ax25_cb		*ax25;
 	struct device   *dev;
 	unsigned char   quality;
 	unsigned char   locked;
@@ -138,7 +140,7 @@
 extern struct device *nr_dev_first(void);
 extern struct device *nr_dev_get(ax25_address *);
 extern int  nr_rt_ioctl(unsigned int, void *);
-extern void nr_link_failed(ax25_address *, struct device *);
+extern void nr_link_failed(ax25_cb *, int);
 extern int  nr_route_frame(struct sk_buff *, ax25_cb *);
 extern int  nr_nodes_get_info(char *, char **, off_t, int, int);
 extern int  nr_neigh_get_info(char *, char **, off_t, int, int);
@@ -152,9 +154,20 @@
 extern int  nr_in_rx_window(struct sock *, unsigned short);
 extern void nr_write_internal(struct sock *, int);
 extern void nr_transmit_dm(struct sk_buff *);
+extern void nr_disconnect(struct sock *, int);
 
 /* nr_timer.c */
-extern void nr_set_timer(struct sock *);
+extern void nr_start_heartbeat(struct sock *);
+extern void nr_start_t1timer(struct sock *);
+extern void nr_start_t2timer(struct sock *);
+extern void nr_start_t4timer(struct sock *);
+extern void nr_start_idletimer(struct sock *);
+extern void nr_stop_heartbeat(struct sock *);
+extern void nr_stop_t1timer(struct sock *);
+extern void nr_stop_t2timer(struct sock *);
+extern void nr_stop_t4timer(struct sock *);
+extern void nr_stop_idletimer(struct sock *);
+extern int  nr_t1timer_running(struct sock *);
 
 /* sysctl_net_netrom.c */
 extern void nr_register_sysctl(void);

FUNET's LINUX-ADM group, linux-adm@nic.funet.fi
TCL-scripts by Sam Shen, slshen@lbl.gov