OpenCores
URL https://opencores.org/ocsvn/or1k/or1k/trunk

Subversion Repositories or1k

[/] [or1k/] [trunk/] [linux/] [linux-2.4/] [include/] [net/] [spx.h] - Blame information for rev 1774

Go to most recent revision | Details | Compare with Previous | View Log

Line No. Rev Author Line
1 1275 phoenix
#ifndef __NET_SPX_H
2
#define __NET_SPX_H
3
 
4
#include <net/ipx.h>
5
 
6
struct spxhdr
7
{       __u8    cctl;
8
        __u8    dtype;
9
#define SPX_DTYPE_ECONN 0xFE    /* Finished */
10
#define SPX_DTYPE_ECACK 0xFF    /* Ok */
11
        __u16   sconn;  /* Connection ID */
12
        __u16   dconn;  /* Connection ID */
13
        __u16   sequence;
14
        __u16   ackseq;
15
        __u16   allocseq;
16
};
17
 
18
struct ipxspxhdr
19
{       struct ipxhdr   ipx;
20
        struct spxhdr   spx;
21
};
22
 
23
#define SPX_SYS_PKT_LEN (sizeof(struct ipxspxhdr))
24
 
25
#ifdef __KERNEL__
26
struct spx_opt
27
{       int     state;
28
        int     sndbuf;
29
        int     retries;        /* Number of WD retries */
30
        int     retransmits;    /* Number of retransmits */
31
        int     max_retries;
32
        int     wd_interval;
33
        void    *owner;
34
        __u16   dest_connid;    /* Net order */
35
        __u16   source_connid;  /* Net order */
36
        __u16   sequence;       /* Host order - our current pkt # */
37
        __u16   alloc;          /* Host order - max seq we can rcv now */
38
        __u16   rmt_ack;        /* Host order - last pkt ACKd by remote */
39
        __u16   rmt_seq;
40
        __u16   acknowledge;
41
        __u16   rmt_alloc;      /* Host order - max seq remote can handle now */
42
        ipx_address     dest_addr;
43
        ipx_address     source_addr;
44
        struct timer_list       watchdog;       /* Idle watch */
45
        struct timer_list       retransmit;     /* Retransmit timer */
46
        struct sk_buff_head     rcv_queue;
47
        struct sk_buff_head     transmit_queue;
48
        struct sk_buff_head     retransmit_queue;
49
};
50
 
51
/* Packet connectino control defines */
52
#define CCTL_SPXII_XHD  0x01    /* SPX2 extended header */
53
#define CCTL_SPX_UNKNOWN 0x02   /* Unknown (unused ??) */
54
#define CCTL_SPXII_NEG  0x04    /* Negotiate size */
55
#define CCTL_SPXII      0x08    /* Set for SPX2 */
56
#define CCTL_EOM        0x10    /* End of message marker */
57
#define CCTL_URG        0x20    /* Urgent marker in SPP (not used in SPX?) */
58
#define CCTL_ACK        0x40    /* Send me an ACK */
59
#define CCTL_CTL        0x80    /* Control message */
60
#define CCTL_SYS        CCTL_CTL        /* Spec uses CCTL_SYS */
61
 
62
/* Connection state defines */
63
#define SPX_CLOSED      7
64
#define SPX_CONNECTING  8
65
#define SPX_CONNECTED   9
66
 
67
/* Packet transmit types - Internal */
68
#define DATA    0        /* Data */
69
#define ACK     1       /* Data ACK */
70
#define WDACK   2       /* WD ACK */
71
#define CONACK  3       /* Connection Request ACK */
72
#define CONREQ  4       /* Connection Request */
73
#define WDREQ   5       /* WD Request */
74
#define DISCON  6       /* Informed Disconnect */
75
#define DISACK  7       /* Informed Disconnect ACK */
76
#define RETRAN  8       /* Int. Retransmit of packet */
77
#define TQUEUE  9       /* Int. Transmit of a queued packet */
78
 
79
/*
80
 * These are good canidates for IOcontrol calls
81
 */
82
 
83
/* Watchdog defines */
84
#define VERIFY_TIMEOUT  3 * HZ
85
#define ABORT_TIMEOUT   30 * HZ
86
 
87
/* Packet retransmit defines */
88
#define RETRY_COUNT     10
89
#define RETRY_TIME      1 * HZ
90
#define MAX_RETRY_DELAY 5 * HZ
91
 
92
#endif /* __KERNEL__ */
93
#endif /* def __NET_SPX_H */

powered by: WebSVN 2.1.0

© copyright 1999-2025 OpenCores.org, equivalent to Oliscience, all rights reserved. OpenCores®, registered trademark.