summaryrefslogtreecommitdiffstats
path: root/include/net
diff options
context:
space:
mode:
authorRalf Baechle <ralf@linux-mips.org>1997-06-03 09:23:20 +0000
committerRalf Baechle <ralf@linux-mips.org>1997-06-03 09:23:20 +0000
commitac5ff8f4a72f7b4e66f73c3c6cb9fe7758cf6f12 (patch)
tree9fc7f8ce32e0d9a4aa055b2a58a05a5d727b333c /include/net
parent52662ff3e66770fd7e4fc508c91056d29c08bff0 (diff)
Sync with Linux 2.1.42.
Diffstat (limited to 'include/net')
-rw-r--r--include/net/ax25.h36
-rw-r--r--include/net/netrom.h2
-rw-r--r--include/net/rose.h66
-rw-r--r--include/net/sock.h7
-rw-r--r--include/net/x25.h8
5 files changed, 58 insertions, 61 deletions
diff --git a/include/net/ax25.h b/include/net/ax25.h
index 71d7fb0b2..9e6f0df11 100644
--- a/include/net/ax25.h
+++ b/include/net/ax25.h
@@ -46,32 +46,12 @@
#define AX25_COND_REJECT 0x02
#define AX25_COND_PEER_RX_BUSY 0x04
#define AX25_COND_OWN_RX_BUSY 0x08
+#define AX25_COND_DAMA_MODE 0x10
#ifndef _LINUX_NETDEVICE_H
#include <linux/netdevice.h>
#endif
-/*
- * These headers are taken from the KA9Q package by Phil Karn. These specific
- * files have been placed under the GPL (not the whole package) by Phil.
- *
- *
- * Copyright 1991 Phil Karn, KA9Q
- *
- * This program is free software; you can redistribute it and/or modify
- * it under the terms of the GNU General Public License as published by
- * the Free Software Foundation; version 2 dated June, 1991.
- *
- * This program is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
- * GNU General Public License for more details.
- *
- * You should have received a copy of the GNU General Public License
- * along with this program; if not, write to the Free Software
- * Foundation, Inc., 675 Mass Ave., Cambridge, MA 02139, USA.
- */
-
/* Upper sub-layer (LAPB) definitions */
/* Control field templates */
@@ -149,7 +129,7 @@ enum {
#define AX25_DEF_T2 (3 * AX25_SLOWHZ) /* T2=3s */
#define AX25_DEF_T3 (300 * AX25_SLOWHZ) /* T3=300s */
#define AX25_DEF_N2 10 /* N2=10 */
-#define AX25_DEF_IDLE (20 * 60 * AX25_SLOWHZ) /* Idle=20 mins */
+#define AX25_DEF_IDLE (0 * 60 * AX25_SLOWHZ) /* Idle=None */
#define AX25_DEF_PACLEN 256 /* Paclen=256 */
#define AX25_DEF_PROTOCOL AX25_PROTO_STD_SIMPLEX /* Standard AX.25 */
#define AX25_DEF_DS_TIMEOUT (3 * 60 * AX25_SLOWHZ) /* DAMA timeout 3 minutes */
@@ -202,17 +182,13 @@ typedef struct ax25_cb {
ax25_digi *digipeat;
ax25_dev *ax25_dev;
unsigned char iamdigi;
- unsigned char state, modulus, hdrincl;
+ unsigned char state, modulus, pidincl;
unsigned short vs, vr, va;
unsigned char condition, backoff;
unsigned char n2, n2count;
-#ifdef CONFIG_AX25_DAMA_SLAVE
- unsigned char dama_slave;
-#endif
unsigned short t1, t2, t3, idle, rtt;
unsigned short t1timer, t2timer, t3timer, idletimer;
- unsigned short paclen;
- unsigned short fragno, fraglen;
+ unsigned short paclen, fragno, fraglen;
struct sk_buff_head write_queue;
struct sk_buff_head reseq_queue;
struct sk_buff_head ack_queue;
@@ -235,7 +211,7 @@ extern void ax25_destroy_socket(ax25_cb *);
extern ax25_cb *ax25_create_cb(void);
extern void ax25_fillin_cb(ax25_cb *, ax25_dev *);
extern int ax25_create(struct socket *, int);
-extern struct sock *ax25_make_new(struct sock *, struct device *);
+extern struct sock *ax25_make_new(struct sock *, struct ax25_dev *);
/* ax25_addr.c */
extern ax25_address null_ax25_address;
@@ -313,7 +289,7 @@ extern int ax25_rt_ioctl(unsigned int, void *);
extern int ax25_rt_get_info(char *, char **, off_t, int, int);
extern int ax25_rt_autobind(ax25_cb *, ax25_address *);
extern void ax25_rt_build_path(ax25_cb *, ax25_address *, struct device *);
-extern void ax25_dg_build_path(struct sk_buff *, ax25_address *, struct device *);
+extern struct sk_buff *ax25_dg_build_path(struct sk_buff *, ax25_address *, struct device *);
extern char ax25_ip_mode_get(ax25_address *, struct device *);
extern void ax25_rt_free(void);
diff --git a/include/net/netrom.h b/include/net/netrom.h
index a3ce51ca3..8a255660a 100644
--- a/include/net/netrom.h
+++ b/include/net/netrom.h
@@ -61,7 +61,7 @@ typedef struct {
struct device *device;
unsigned char my_index, my_id;
unsigned char your_index, your_id;
- unsigned char state, condition, bpqext, hdrincl, window;
+ unsigned char state, condition, bpqext, window;
unsigned short vs, vr, va, vl;
unsigned char n2, n2count;
unsigned short t1, t2, t4, idle;
diff --git a/include/net/rose.h b/include/net/rose.h
index 2c9565d8a..1e60cfa8f 100644
--- a/include/net/rose.h
+++ b/include/net/rose.h
@@ -56,10 +56,11 @@ enum {
#define ROSE_DEFAULT_IDLE (20 * 60 * ROSE_SLOWHZ) /* Default No Activity value */
#define ROSE_DEFAULT_ROUTING 1 /* Default routing flag */
#define ROSE_DEFAULT_FAIL_TIMEOUT (120 * ROSE_SLOWHZ) /* Time until link considered usable */
+#define ROSE_DEFAULT_MAXVC 50 /* Maximum number of VCs per neighbour */
+#define ROSE_DEFAULT_WINDOW_SIZE 3 /* Default window size */
#define ROSE_MODULUS 8
-#define ROSE_MAX_WINDOW_SIZE 2 /* Maximum Window Allowable */
-#define ROSE_MAX_PACKET_SIZE 128 /* Maximum Packet Length */
+#define ROSE_MAX_PACKET_SIZE 256 /* Maximum packet size */
#define ROSE_COND_ACK_PENDING 0x01
#define ROSE_COND_PEER_RX_BUSY 0x02
@@ -77,31 +78,42 @@ enum {
#define FAC_CCITT_SRC_NSAP 0xCB
struct rose_neigh {
- struct rose_neigh *next;
- ax25_address callsign;
- ax25_digi *digipeat;
- struct device *dev;
- unsigned short count;
- unsigned int number;
- int restarted;
- struct sk_buff_head queue;
- unsigned short t0timer, ftimer;
- struct timer_list timer;
+ struct rose_neigh *next;
+ ax25_address callsign;
+ ax25_digi *digipeat;
+ struct device *dev;
+ unsigned short count;
+ unsigned int number;
+ char restarted;
+ char dce_mode;
+ struct sk_buff_head queue;
+ unsigned short t0timer, ftimer;
+ struct timer_list timer;
};
struct rose_node {
- struct rose_node *next;
- rose_address address;
- unsigned short mask;
- unsigned char count;
- struct rose_neigh *neighbour[3];
+ struct rose_node *next;
+ rose_address address;
+ unsigned short mask;
+ unsigned char count;
+ struct rose_neigh *neighbour[3];
};
struct rose_route {
- struct rose_route *next;
- unsigned int lci1, lci2;
- struct rose_neigh *neigh1, *neigh2;
- unsigned int rand;
+ struct rose_route *next;
+ unsigned int lci1, lci2;
+ rose_address src_addr, dest_addr;
+ ax25_address src_call, dest_call;
+ struct rose_neigh *neigh1, *neigh2;
+ unsigned int rand;
+};
+
+struct rose_facilities {
+ rose_address source_addr, dest_addr;
+ ax25_address source_call, dest_call;
+ unsigned char source_ndigis, dest_ndigis;
+ ax25_address source_digi, dest_digi;
+ unsigned int rand;
};
typedef struct {
@@ -112,7 +124,7 @@ typedef struct {
struct rose_neigh *neighbour;
struct device *device;
unsigned int lci, rand;
- unsigned char state, condition, hdrincl;
+ unsigned char state, condition, qbitincl;
unsigned short vs, vr, va, vl;
unsigned short timer;
unsigned short t1, t2, t3, hb, idle;
@@ -131,11 +143,14 @@ extern int sysctl_rose_no_activity_timeout;
extern int sysctl_rose_ack_hold_back_timeout;
extern int sysctl_rose_routing_control;
extern int sysctl_rose_link_fail_timeout;
+extern int sysctl_rose_maximum_vcs;
+extern int sysctl_rose_window_size;
extern int rosecmp(rose_address *, rose_address *);
extern int rosecmpm(rose_address *, rose_address *, unsigned short);
extern char *rose2asc(rose_address *);
-extern struct sock *rose_find_socket(unsigned int, struct device *);
-extern unsigned int rose_new_lci(struct device *);
+extern struct sock *rose_find_socket(unsigned int, struct rose_neigh *);
+extern void rose_kill_by_neigh(struct rose_neigh *);
+extern unsigned int rose_new_lci(struct rose_neigh *);
extern int rose_rx_call_request(struct sk_buff *, struct device *, struct rose_neigh *, unsigned int);
extern void rose_destroy_socket(struct sock *);
@@ -168,6 +183,7 @@ extern void rose_rt_device_down(struct device *);
extern void rose_link_device_down(struct device *);
extern struct device *rose_dev_first(void);
extern struct device *rose_dev_get(rose_address *);
+extern struct rose_route *rose_route_free_lci(unsigned int, struct rose_neigh *);
extern struct device *rose_ax25_dev_get(char *);
extern struct rose_neigh *rose_get_neigh(rose_address *);
extern int rose_rt_ioctl(unsigned int, void *);
@@ -183,7 +199,7 @@ extern void rose_clear_queues(struct sock *);
extern int rose_validate_nr(struct sock *, unsigned short);
extern void rose_write_internal(struct sock *, int);
extern int rose_decode(struct sk_buff *, int *, int *, int *, int *, int *);
-extern int rose_parse_facilities(struct sk_buff *, rose_cb *);
+extern int rose_parse_facilities(struct sk_buff *, struct rose_facilities *);
extern int rose_create_facilities(unsigned char *, rose_cb *);
/* rose_timer.c */
diff --git a/include/net/sock.h b/include/net/sock.h
index 354d8dae5..a25907b19 100644
--- a/include/net/sock.h
+++ b/include/net/sock.h
@@ -296,20 +296,23 @@ struct tcp_opt
* sockmem [mem, proto, callbacks]
*
* union or struct {
- * netrom;
- * ax_25;
+ * ax25;
* } ll_pinfo;
*
* union {
* ipv4;
* ipv6;
* ipx;
+ * netrom;
+ * rose;
+ * x25;
* } net_pinfo;
*
* union {
* tcp;
* udp;
* spx;
+ * netrom;
* } tp_pinfo;
*
* }
diff --git a/include/net/x25.h b/include/net/x25.h
index c98afb6de..cb1ae8bee 100644
--- a/include/net/x25.h
+++ b/include/net/x25.h
@@ -157,6 +157,11 @@ extern int x25_llc_receive_frame(struct sk_buff *, struct device *, struct pack
extern void x25_establish_link(struct x25_neigh *);
extern void x25_terminate_link(struct x25_neigh *);
+/* x25_facilities.c */
+extern int x25_parse_facilities(struct sk_buff *, struct x25_facilities *);
+extern int x25_create_facilities(unsigned char *, struct x25_facilities *);
+extern int x25_negotiate_facilities(struct sk_buff *, struct sock *, struct x25_facilities *);
+
/* x25_in.c */
extern int x25_process_rx_frame(struct sock *, struct sk_buff *);
@@ -173,7 +178,6 @@ extern void x25_transmit_clear_request(struct x25_neigh *, unsigned int, unsigne
extern void x25_transmit_link(struct sk_buff *, struct x25_neigh *);
extern int x25_subscr_ioctl(unsigned int, void *);
extern struct x25_neigh *x25_get_neigh(struct device *);
-extern int x25_link_get_info(char *, char **, off_t, int, int);
extern void x25_link_free(void);
/* x25_out.c */
@@ -195,8 +199,6 @@ extern void x25_clear_queues(struct sock *);
extern int x25_validate_nr(struct sock *, unsigned short);
extern void x25_write_internal(struct sock *, int);
extern int x25_decode(struct sock *, struct sk_buff *, int *, int *, int *, int *, int *);
-extern int x25_parse_facilities(struct sk_buff *, struct x25_facilities *);
-extern int x25_create_facilities(unsigned char *, struct x25_facilities *);
/* x25_timer.c */
extern void x25_set_timer(struct sock *);