Remove SPX and the last typedefs in IPX, create ipx_hdr

parent d52a86be
......@@ -24,15 +24,13 @@ struct sockaddr_ipx
#define IPX_DLTITF 0
#define IPX_CRTITF 1
typedef struct ipx_route_definition
{
struct ipx_route_definition {
__u32 ipx_network;
__u32 ipx_router_network;
unsigned char ipx_router_node[IPX_NODE_LEN];
} ipx_route_definition;
};
typedef struct ipx_interface_definition
{
struct ipx_interface_definition {
__u32 ipx_network;
unsigned char ipx_device[16];
unsigned char ipx_dlink_type;
......@@ -47,13 +45,12 @@ typedef struct ipx_interface_definition
#define IPX_PRIMARY 1
#define IPX_INTERNAL 2
unsigned char ipx_node[IPX_NODE_LEN];
} ipx_interface_definition;
};
typedef struct ipx_config_data
{
struct ipx_config_data {
unsigned char ipxcfg_auto_select_primary;
unsigned char ipxcfg_auto_create_interfaces;
} ipx_config_data;
};
/*
* OLD Route Definition for backward compatibility.
......@@ -77,13 +74,4 @@ struct ipx_route_def
#define SIOCAIPXPRISLT (SIOCPROTOPRIVATE+1)
#define SIOCIPXCFGDATA (SIOCPROTOPRIVATE+2)
#define SIOCIPXNCPCONN (SIOCPROTOPRIVATE+3)
#ifdef __KERNEL__
#include <linux/skbuff.h>
extern int ipxrtr_route_skb(struct sk_buff *);
extern int ipx_if_offset(unsigned long ipx_net_number);
extern void ipx_remove_socket(struct sock *sk);
#endif /* def __KERNEL__ */
#endif /* def _IPX_H_ */
......@@ -182,7 +182,6 @@ struct sk_buff {
struct icmphdr *icmph;
struct igmphdr *igmph;
struct iphdr *ipiph;
struct spxhdr *spxh;
unsigned char *raw;
} h;
......@@ -190,7 +189,6 @@ struct sk_buff {
struct iphdr *iph;
struct ipv6hdr *ipv6h;
struct arphdr *arph;
struct ipxhdr *ipxh;
unsigned char *raw;
} nh;
......
......@@ -14,12 +14,11 @@
#include <net/datalink.h>
#include <linux/ipx.h>
typedef struct
{
struct ipx_address {
__u32 net;
__u8 node[IPX_NODE_LEN];
__u16 sock;
} ipx_address;
};
#define ipx_broadcast_node "\377\377\377\377\377\377"
#define ipx_this_node "\0\0\0\0\0\0"
......@@ -39,11 +38,16 @@ struct ipxhdr
#define IPX_TYPE_SPX 0x05 /* SPX protocol */
#define IPX_TYPE_NCP 0x11 /* $lots for docs on this (SPIT) */
#define IPX_TYPE_PPROP 0x14 /* complicated flood fill brdcast */
ipx_address ipx_dest __attribute__ ((packed));
ipx_address ipx_source __attribute__ ((packed));
struct ipx_address ipx_dest __attribute__ ((packed));
struct ipx_address ipx_source __attribute__ ((packed));
};
typedef struct ipx_interface {
static __inline__ struct ipxhdr *ipx_hdr(struct sk_buff *skb)
{
return (struct ipxhdr *)skb->h.raw;
}
struct ipx_interface {
/* IPX address */
__u32 if_netnum;
unsigned char if_node[IPX_NODE_LEN];
......@@ -65,16 +69,16 @@ typedef struct ipx_interface {
unsigned char if_primary;
struct ipx_interface *if_next;
} ipx_interface;
};
typedef struct ipx_route {
struct ipx_route {
__u32 ir_net;
ipx_interface *ir_intrfc;
struct ipx_interface *ir_intrfc;
unsigned char ir_routed;
unsigned char ir_router_node[IPX_NODE_LEN];
struct ipx_route *ir_next;
struct ipx_route *ir_next;
atomic_t refcnt;
} ipx_route;
};
#ifdef __KERNEL__
struct ipx_cb {
......@@ -88,8 +92,8 @@ struct ipx_cb {
};
struct ipx_opt {
ipx_address dest_addr;
ipx_interface *intrfc;
struct ipx_address dest_addr;
struct ipx_interface *intrfc;
unsigned short port;
#ifdef CONFIG_IPX_INTERN
unsigned char node[IPX_NODE_LEN];
......@@ -106,7 +110,4 @@ struct ipx_opt {
#define IPX_MIN_EPHEMERAL_SOCKET 0x4000
#define IPX_MAX_EPHEMERAL_SOCKET 0x7fff
extern int ipx_register_spx(struct proto_ops **, struct net_proto_family *);
extern int ipx_unregister_spx(void);
#endif /* def _NET_INET_IPX_H_ */
#ifndef __NET_SPX_H
#define __NET_SPX_H
#include <net/ipx.h>
struct spxhdr
{ __u8 cctl;
__u8 dtype;
#define SPX_DTYPE_ECONN 0xFE /* Finished */
#define SPX_DTYPE_ECACK 0xFF /* Ok */
__u16 sconn; /* Connection ID */
__u16 dconn; /* Connection ID */
__u16 sequence;
__u16 ackseq;
__u16 allocseq;
};
struct ipxspxhdr
{ struct ipxhdr ipx;
struct spxhdr spx;
};
#define SPX_SYS_PKT_LEN (sizeof(struct ipxspxhdr))
#ifdef __KERNEL__
struct spx_opt
{ int state;
int sndbuf;
int retries; /* Number of WD retries */
int retransmits; /* Number of retransmits */
int max_retries;
int wd_interval;
void *owner;
__u16 dest_connid; /* Net order */
__u16 source_connid; /* Net order */
__u16 sequence; /* Host order - our current pkt # */
__u16 alloc; /* Host order - max seq we can rcv now */
__u16 rmt_ack; /* Host order - last pkt ACKd by remote */
__u16 rmt_seq;
__u16 acknowledge;
__u16 rmt_alloc; /* Host order - max seq remote can handle now */
ipx_address dest_addr;
ipx_address source_addr;
struct timer_list watchdog; /* Idle watch */
struct timer_list retransmit; /* Retransmit timer */
struct sk_buff_head rcv_queue;
struct sk_buff_head transmit_queue;
struct sk_buff_head retransmit_queue;
};
#define spx_sk(__sk) ((struct spx_opt *)(((struct sock *)(__sk)) + 1))
/* Packet connectino control defines */
#define CCTL_SPXII_XHD 0x01 /* SPX2 extended header */
#define CCTL_SPX_UNKNOWN 0x02 /* Unknown (unused ??) */
#define CCTL_SPXII_NEG 0x04 /* Negotiate size */
#define CCTL_SPXII 0x08 /* Set for SPX2 */
#define CCTL_EOM 0x10 /* End of message marker */
#define CCTL_URG 0x20 /* Urgent marker in SPP (not used in SPX?) */
#define CCTL_ACK 0x40 /* Send me an ACK */
#define CCTL_CTL 0x80 /* Control message */
#define CCTL_SYS CCTL_CTL /* Spec uses CCTL_SYS */
/* Connection state defines */
#define SPX_CLOSED 7
#define SPX_CONNECTING 8
#define SPX_CONNECTED 9
/* Packet transmit types - Internal */
#define DATA 0 /* Data */
#define ACK 1 /* Data ACK */
#define WDACK 2 /* WD ACK */
#define CONACK 3 /* Connection Request ACK */
#define CONREQ 4 /* Connection Request */
#define WDREQ 5 /* WD Request */
#define DISCON 6 /* Informed Disconnect */
#define DISACK 7 /* Informed Disconnect ACK */
#define RETRAN 8 /* Int. Retransmit of packet */
#define TQUEUE 9 /* Int. Transmit of a queued packet */
/*
* These are good canidates for IOcontrol calls
*/
/* Watchdog defines */
#define VERIFY_TIMEOUT 3 * HZ
#define ABORT_TIMEOUT 30 * HZ
/* Packet retransmit defines */
#define RETRY_COUNT 10
#define RETRY_TIME 1 * HZ
#define MAX_RETRY_DELAY 5 * HZ
#endif /* __KERNEL__ */
#endif /* def __NET_SPX_H */
......@@ -23,25 +23,3 @@ CONFIG_IPX_INTERN
If you don't know what you are doing, say N.
CONFIG_SPX
* Orphaned entry retained 20 April 2001 by Petr Vandrovec *
* If you read this note from the configurator, please contact *
* the Configure.help maintainers. *
The Sequenced Packet eXchange protocol is a transport layer protocol
built on top of IPX. It is used in Novell NetWare systems for
client-server applications and is similar to TCP (which runs on top
of IP).
Note that Novell NetWare file sharing does not use SPX; it uses a
protocol called NCP, for which separate Linux support is available
("NCP file system support" below for the client side, and the user
space programs lwared or mars_nwe for the server side).
Say Y here if you have use for SPX; read the IPX-HOWTO at
<http://www.linuxdoc.org/docs.html#howto> for details.
This driver is also available as a module ( = code which can be
inserted in and removed from the running kernel whenever you want).
The module will be called af_spx.o. If you want to compile it as a
module, say M here and read <file:Documentation/modules.txt>.
......@@ -3,6 +3,3 @@
#
bool ' IPX: Full internal IPX network' CONFIG_IPX_INTERN
#if [ "$CONFIG_EXPERIMENTAL" = "y" ]; then
# dep_tristate ' IPX: SPX networking (EXPERIMENTAL)' CONFIG_SPX $CONFIG_IPX
#fi
......@@ -8,7 +8,6 @@ obj-$(CONFIG_IPX) += ipx.o
ipx-y := af_ipx.o
ipx-$(CONFIG_SYSCTL) += sysctl_net_ipx.o
ipx-$(CONFIG_SPX) += af_spx.o
ipx-objs := $(ipx-y)
include $(TOPDIR)/Rules.make
This diff is collapsed.
This diff is collapsed.
......@@ -17,21 +17,36 @@
/* From af_ipx.c */
extern int sysctl_ipx_pprop_broadcasting;
ctl_table ipx_table[] = {
{ NET_IPX_PPROP_BROADCASTING, "ipx_pprop_broadcasting",
&sysctl_ipx_pprop_broadcasting, sizeof(int), 0644, NULL,
&proc_dointvec },
{ 0 }
static struct ctl_table ipx_table[] = {
{
.ctl_name = NET_IPX_PPROP_BROADCASTING,
.procname = "ipx_pprop_broadcasting",
.data = &sysctl_ipx_pprop_broadcasting,
.maxlen = sizeof(int),
.mode = 0644,
.proc_handler = &proc_dointvec,
},
{ 0 },
};
static ctl_table ipx_dir_table[] = {
{ NET_IPX, "ipx", NULL, 0, 0555, ipx_table },
{ 0 }
static struct ctl_table ipx_dir_table[] = {
{
.ctl_name = NET_IPX,
.procname = "ipx",
.mode = 0555,
.child = ipx_table,
},
{ 0 },
};
static ctl_table ipx_root_table[] = {
{ CTL_NET, "net", NULL, 0, 0555, ipx_dir_table },
{ 0 }
static struct ctl_table ipx_root_table[] = {
{
.ctl_name = CTL_NET,
.procname = "net",
.mode = 0555,
.child = ipx_dir_table,
},
{ 0 },
};
static struct ctl_table_header *ipx_table_header;
......
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