OpenAFS
OpenAFS distributed network file system
/cygdrive/c/src/openafs/openafs.git/repo/src/rx/rx_conn.h
00001 /*
00002  * Copyright 2000, International Business Machines Corporation and others.
00003  * All Rights Reserved.
00004  *
00005  * This software has been released under the terms of the IBM Public
00006  * License.  For details, see the LICENSE file in the top-level source
00007  * directory or online at http://www.openafs.org/dl/license10.html
00008  */
00009 
00010 #ifndef OPENAFS_RX_CONN_H
00011 #define OPENAFS_RX_CONN_H 1
00012 
00013 /* A connection is an authenticated communication path, allowing limited
00014  * multiple asynchronous conversations. */
00015 
00016 #ifdef KDUMP_RX_LOCK
00017 struct rx_connection_rx_lock {
00018     struct rx_connection_rx_lock *next; /*  on hash chain _or_ free list */
00019     struct rx_peer_rx_lock *peer;
00020 #else
00021 struct rx_connection {
00022     struct rx_connection *next; /*  on hash chain _or_ free list */
00023     struct rx_peer *peer;
00024 #endif
00025 #ifdef  RX_ENABLE_LOCKS
00026     afs_kmutex_t conn_call_lock;        /* locks conn_call_cv */
00027     afs_kcondvar_t conn_call_cv;
00028     afs_kmutex_t conn_data_lock;        /* locks packet data */
00029 #endif
00030     afs_uint32 epoch;           /* Process start time of client side of connection */
00031     afs_uint32 cid;             /* Connection id (call channel is bottom bits) */
00032     afs_int32 error;            /* If this connection is in error, this is it */
00033 #ifdef KDUMP_RX_LOCK
00034     struct rx_call_rx_lock *call[RX_MAXCALLS];
00035 #else
00036     struct rx_call *call[RX_MAXCALLS];
00037 #endif
00038     afs_uint32 callNumber[RX_MAXCALLS]; /* Current call numbers */
00039     afs_uint32 rwind[RX_MAXCALLS];
00040     u_short twind[RX_MAXCALLS];
00041     afs_uint32 lastBusy[RX_MAXCALLS]; /* timestamp of the last time we got an
00042                                        * RX_PACKET_TYPE_BUSY packet for this
00043                                        * call slot, or 0 if the slot is not busy */
00044     afs_uint32 serial;          /* Next outgoing packet serial number */
00045     afs_int32 lastPacketSize; /* last >max attempt */
00046     afs_int32 lastPacketSizeSeq; /* seq number of attempt */
00047     afs_int32 lastPingSize; /* last MTU ping attempt */
00048     afs_int32 lastPingSizeSer; /* serial of last MTU ping attempt */
00049     struct rxevent *challengeEvent;     /* Scheduled when the server is challenging a     */
00050     struct rxevent *delayedAbortEvent;  /* Scheduled to throttle looping client */
00051     struct rxevent *checkReachEvent;    /* Scheduled when checking reachability */
00052     int abortCount;             /* count of abort messages sent */
00053     /* client-- to retransmit the challenge */
00054     struct rx_service *service; /* used by servers only */
00055     u_short serviceId;          /* To stamp on requests (clients only) */
00056     afs_int32 refCount;         /* Reference count (rx_refcnt_mutex) */
00057     u_char flags;               /* Defined below - (conn_data_lock) */
00058     u_char type;                /* Type of connection, defined below */
00059     u_char secondsUntilPing;    /* how often to ping for each active call */
00060     u_char securityIndex;       /* corresponds to the security class of the */
00061     /* securityObject for this conn */
00062     struct rx_securityClass *securityObject;    /* Security object for this connection */
00063     void *securityData;         /* Private data for this conn's security class */
00064     u_short securityHeaderSize; /* Length of security module's packet header data */
00065     u_short securityMaxTrailerSize;     /* Length of security module's packet trailer data */
00066 
00067     int timeout;                /* Overall timeout per call (seconds) for this conn */
00068     int lastSendTime;           /* Last send time for this connection */
00069     u_short secondsUntilDead;   /* Maximum silence from peer before RX_CALL_DEAD */
00070     u_short hardDeadTime;       /* hard max for call execution */
00071     u_short idleDeadTime;       /* max time a call can be idle (no data) */
00072     u_char ackRate;             /* how many packets between ack requests */
00073     u_char makeCallWaiters;     /* how many rx_NewCalls are waiting */
00074     u_char idleDeadDetection;   /* detect idle dead timeouts? */
00075     afs_int32 secondsUntilNatPing;      /* how often to ping conn */
00076     struct rxevent *natKeepAliveEvent; /* Scheduled to keep connection open */
00077     afs_int32 msgsizeRetryErr;
00078     int nSpecific;              /* number entries in specific data */
00079     void **specific;            /* pointer to connection specific data */
00080 };
00081 
00082 #endif
00083 
 All Data Structures Files Functions Variables