Commit cbb6ac6d authored by David S. Miller's avatar David S. Miller

Merge master.kernel.org:/home/acme/BK/x25-2.5

into nuts.ninka.net:/home/davem/src/BK/net-2.5
parents 464f9b3f 95c783fa
...@@ -39,16 +39,16 @@ ...@@ -39,16 +39,16 @@
* An X.121 address, it is held as ASCII text, null terminated, up to 15 * An X.121 address, it is held as ASCII text, null terminated, up to 15
* digits and a null terminator. * digits and a null terminator.
*/ */
typedef struct { struct x25_address {
char x25_addr[16]; char x25_addr[16];
} x25_address; };
/* /*
* Linux X.25 Address structure, used for bind, and connect mostly. * Linux X.25 Address structure, used for bind, and connect mostly.
*/ */
struct sockaddr_x25 { struct sockaddr_x25 {
sa_family_t sx25_family; /* Must be AF_X25 */ sa_family_t sx25_family; /* Must be AF_X25 */
x25_address sx25_addr; /* X.121 Address */ struct x25_address sx25_addr; /* X.121 Address */
}; };
/* /*
...@@ -78,9 +78,9 @@ struct x25_subscrip_struct { ...@@ -78,9 +78,9 @@ struct x25_subscrip_struct {
* Routing table control structure. * Routing table control structure.
*/ */
struct x25_route_struct { struct x25_route_struct {
x25_address address; struct x25_address address;
unsigned int sigdigits; unsigned int sigdigits;
char device[200]; char device[200];
}; };
/* /*
......
...@@ -103,9 +103,9 @@ enum { ...@@ -103,9 +103,9 @@ enum {
struct x25_route { struct x25_route {
struct x25_route *next; struct x25_route *next;
x25_address address; /* Start of address range */ struct x25_address address; /* Start of address range */
unsigned int sigdigits; /* Number of sig digits */ unsigned int sigdigits; /* Number of sig digits */
struct net_device *dev; /* More than one for MLP */ struct net_device *dev; /* More than one for MLP */
}; };
struct x25_neigh { struct x25_neigh {
...@@ -120,7 +120,7 @@ struct x25_neigh { ...@@ -120,7 +120,7 @@ struct x25_neigh {
}; };
typedef struct { typedef struct {
x25_address source_addr, dest_addr; struct x25_address source_addr, dest_addr;
struct x25_neigh *neighbour; struct x25_neigh *neighbour;
unsigned int lci; unsigned int lci;
unsigned char state, condition, qbitincl, intflag; unsigned char state, condition, qbitincl, intflag;
...@@ -148,8 +148,10 @@ extern int sysctl_x25_reset_request_timeout; ...@@ -148,8 +148,10 @@ extern int sysctl_x25_reset_request_timeout;
extern int sysctl_x25_clear_request_timeout; extern int sysctl_x25_clear_request_timeout;
extern int sysctl_x25_ack_holdback_timeout; extern int sysctl_x25_ack_holdback_timeout;
extern int x25_addr_ntoa(unsigned char *, x25_address *, x25_address *); extern int x25_addr_ntoa(unsigned char *, struct x25_address *,
extern int x25_addr_aton(unsigned char *, x25_address *, x25_address *); struct x25_address *);
extern int x25_addr_aton(unsigned char *, struct x25_address *,
struct x25_address *);
extern unsigned int x25_new_lci(struct x25_neigh *); extern unsigned int x25_new_lci(struct x25_neigh *);
extern struct sock *x25_find_socket(unsigned int, struct x25_neigh *); extern struct sock *x25_find_socket(unsigned int, struct x25_neigh *);
extern void x25_destroy_socket(struct sock *); extern void x25_destroy_socket(struct sock *);
...@@ -194,7 +196,7 @@ extern void x25_kick(struct sock *); ...@@ -194,7 +196,7 @@ extern void x25_kick(struct sock *);
extern void x25_enquiry_response(struct sock *); extern void x25_enquiry_response(struct sock *);
/* x25_route.c */ /* x25_route.c */
extern struct net_device *x25_get_route(x25_address *); extern struct net_device *x25_get_route(struct x25_address *);
extern struct net_device *x25_dev_get(char *); extern struct net_device *x25_dev_get(char *);
extern void x25_route_device_down(struct net_device *); extern void x25_route_device_down(struct net_device *);
extern int x25_route_ioctl(unsigned int, void *); extern int x25_route_ioctl(unsigned int, void *);
......
...@@ -68,9 +68,10 @@ static struct sock *volatile x25_list /* = NULL initially */; ...@@ -68,9 +68,10 @@ static struct sock *volatile x25_list /* = NULL initially */;
static struct proto_ops x25_proto_ops; static struct proto_ops x25_proto_ops;
static x25_address null_x25_address = {" "}; static struct x25_address null_x25_address = {" "};
int x25_addr_ntoa(unsigned char *p, x25_address *called_addr, x25_address *calling_addr) int x25_addr_ntoa(unsigned char *p, struct x25_address *called_addr,
struct x25_address *calling_addr)
{ {
int called_len, calling_len; int called_len, calling_len;
char *called, *calling; char *called, *calling;
...@@ -107,7 +108,8 @@ int x25_addr_ntoa(unsigned char *p, x25_address *called_addr, x25_address *calli ...@@ -107,7 +108,8 @@ int x25_addr_ntoa(unsigned char *p, x25_address *called_addr, x25_address *calli
return 1 + (called_len + calling_len + 1) / 2; return 1 + (called_len + calling_len + 1) / 2;
} }
int x25_addr_aton(unsigned char *p, x25_address *called_addr, x25_address *calling_addr) int x25_addr_aton(unsigned char *p, struct x25_address *called_addr,
struct x25_address *calling_addr)
{ {
unsigned int called_len, calling_len; unsigned int called_len, calling_len;
char *called, *calling; char *called, *calling;
...@@ -238,7 +240,7 @@ static void x25_insert_socket(struct sock *sk) ...@@ -238,7 +240,7 @@ static void x25_insert_socket(struct sock *sk)
* Find a socket that wants to accept the Call Request we just * Find a socket that wants to accept the Call Request we just
* received. * received.
*/ */
static struct sock *x25_find_listener(x25_address *addr) static struct sock *x25_find_listener(struct x25_address *addr)
{ {
unsigned long flags; unsigned long flags;
struct sock *s; struct sock *s;
...@@ -767,7 +769,7 @@ int x25_rx_call_request(struct sk_buff *skb, struct x25_neigh *neigh, unsigned i ...@@ -767,7 +769,7 @@ int x25_rx_call_request(struct sk_buff *skb, struct x25_neigh *neigh, unsigned i
struct sock *sk; struct sock *sk;
struct sock *make; struct sock *make;
x25_cb *makex25; x25_cb *makex25;
x25_address source_addr, dest_addr; struct x25_address source_addr, dest_addr;
struct x25_facilities facilities; struct x25_facilities facilities;
int len; int len;
......
...@@ -98,7 +98,7 @@ static int x25_queue_rx_frame(struct sock *sk, struct sk_buff *skb, int more) ...@@ -98,7 +98,7 @@ static int x25_queue_rx_frame(struct sock *sk, struct sk_buff *skb, int more)
*/ */
static int x25_state1_machine(struct sock *sk, struct sk_buff *skb, int frametype) static int x25_state1_machine(struct sock *sk, struct sk_buff *skb, int frametype)
{ {
x25_address source_addr, dest_addr; struct x25_address source_addr, dest_addr;
switch (frametype) { switch (frametype) {
case X25_CALL_ACCEPTED: { case X25_CALL_ACCEPTED: {
......
...@@ -48,7 +48,8 @@ static struct x25_route *x25_route_list /* = NULL initially */; ...@@ -48,7 +48,8 @@ static struct x25_route *x25_route_list /* = NULL initially */;
/* /*
* Add a new route. * Add a new route.
*/ */
static int x25_add_route(x25_address *address, unsigned int sigdigits, struct net_device *dev) static int x25_add_route(struct x25_address *address, unsigned int sigdigits,
struct net_device *dev)
{ {
struct x25_route *x25_route; struct x25_route *x25_route;
unsigned long flags; unsigned long flags;
...@@ -103,7 +104,8 @@ static void x25_remove_route(struct x25_route *x25_route) ...@@ -103,7 +104,8 @@ static void x25_remove_route(struct x25_route *x25_route)
restore_flags(flags); restore_flags(flags);
} }
static int x25_del_route(x25_address *address, unsigned int sigdigits, struct net_device *dev) static int x25_del_route(struct x25_address *address, unsigned int sigdigits,
struct net_device *dev)
{ {
struct x25_route *x25_route; struct x25_route *x25_route;
...@@ -158,7 +160,7 @@ struct net_device *x25_dev_get(char *devname) ...@@ -158,7 +160,7 @@ struct net_device *x25_dev_get(char *devname)
/* /*
* Find a device given an X.25 address. * Find a device given an X.25 address.
*/ */
struct net_device *x25_get_route(x25_address *addr) struct net_device *x25_get_route(struct x25_address *addr)
{ {
struct x25_route *route, *use = NULL; struct x25_route *route, *use = NULL;
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment