rx: Remove idleDeadDetection
[openafs.git] / src / rx / rx_conn.h
1 /*
2  * Copyright 2000, International Business Machines Corporation and others.
3  * All Rights Reserved.
4  *
5  * This software has been released under the terms of the IBM Public
6  * License.  For details, see the LICENSE file in the top-level source
7  * directory or online at http://www.openafs.org/dl/license10.html
8  */
9
10 #ifndef OPENAFS_RX_CONN_H
11 #define OPENAFS_RX_CONN_H 1
12
13 /* A connection is an authenticated communication path, allowing limited
14  * multiple asynchronous conversations. */
15
16 #ifdef KDUMP_RX_LOCK
17 struct rx_connection_rx_lock {
18     struct rx_connection_rx_lock *next; /*  on hash chain _or_ free list */
19     struct rx_peer_rx_lock *peer;
20 #else
21 struct rx_connection {
22     struct rx_connection *next; /*  on hash chain _or_ free list */
23     struct rx_peer *peer;
24 #endif
25 #ifdef  RX_ENABLE_LOCKS
26     afs_kmutex_t conn_call_lock;        /* locks conn_call_cv */
27     afs_kcondvar_t conn_call_cv;
28     afs_kmutex_t conn_data_lock;        /* locks packet data */
29 #endif
30     afs_uint32 epoch;           /* Process start time of client side of connection */
31     afs_uint32 cid;             /* Connection id (call channel is bottom bits) */
32     afs_int32 error;            /* If this connection is in error, this is it */
33 #ifdef KDUMP_RX_LOCK
34     struct rx_call_rx_lock *call[RX_MAXCALLS];
35 #else
36     struct rx_call *call[RX_MAXCALLS];
37 #endif
38     afs_uint32 callNumber[RX_MAXCALLS]; /* Current call numbers */
39     afs_uint32 rwind[RX_MAXCALLS];
40     u_short twind[RX_MAXCALLS];
41     afs_uint32 lastBusy[RX_MAXCALLS]; /* timestamp of the last time we got an
42                                        * RX_PACKET_TYPE_BUSY packet for this
43                                        * call slot, or 0 if the slot is not busy */
44     afs_uint32 serial;          /* Next outgoing packet serial number */
45     afs_int32 lastPacketSize; /* size of last >max attempt, excludes headers */
46     afs_int32 lastPacketSizeSeq; /* seq number of attempt */
47     afs_int32 lastPingSize; /* size of last MTU ping attempt, w/o headers */
48     afs_int32 lastPingSizeSer; /* serial of last MTU ping attempt */
49     struct rxevent *challengeEvent;     /* Scheduled when the server is challenging a     */
50     struct rxevent *delayedAbortEvent;  /* Scheduled to throttle looping client */
51     struct rxevent *checkReachEvent;    /* Scheduled when checking reachability */
52     int abortCount;             /* count of abort messages sent */
53     /* client-- to retransmit the challenge */
54     struct rx_service *service; /* used by servers only */
55     u_short serviceId;          /* To stamp on requests (clients only) */
56     afs_int32 refCount;         /* Reference count (rx_refcnt_mutex) */
57     u_char flags;               /* Defined below - (conn_data_lock) */
58     u_char type;                /* Type of connection, defined below */
59     u_char secondsUntilPing;    /* how often to ping for each active call */
60     u_char securityIndex;       /* corresponds to the security class of the */
61     /* securityObject for this conn */
62     struct rx_securityClass *securityObject;    /* Security object for this connection */
63     void *securityData;         /* Private data for this conn's security class */
64     u_short securityHeaderSize; /* Length of security module's packet header data */
65     u_short securityMaxTrailerSize;     /* Length of security module's packet trailer data */
66     int securityChallengeSent;  /* Have we ever sent a challenge? */
67
68     int timeout;                /* Overall timeout per call (seconds) for this conn */
69     int lastSendTime;           /* Last send time for this connection */
70     u_short secondsUntilDead;   /* Maximum silence from peer before RX_CALL_DEAD */
71     u_short hardDeadTime;       /* hard max for call execution */
72     u_short idleDeadTime;       /* max time a call can be idle (no data) */
73     u_char ackRate;             /* how many packets between ack requests */
74     u_char makeCallWaiters;     /* how many rx_NewCalls are waiting */
75     afs_int32 secondsUntilNatPing;      /* how often to ping conn */
76     struct rxevent *natKeepAliveEvent; /* Scheduled to keep connection open */
77     afs_int32 msgsizeRetryErr;
78     int nSpecific;              /* number entries in specific data */
79     void **specific;            /* pointer to connection specific data */
80 };
81
82 #endif
83