OpenAFS
OpenAFS distributed network file system
/cygdrive/c/src/openafs/openafs.git/repo/src/rx/rx_peer.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_PEER_H
00011 #define OPENAFS_RX_PEER_H
00012 
00013 /* A peer refers to a peer process, specified by a (host,port) pair.  There may
00014  * be more than one peer on a given host. */
00015 
00016 #ifdef KDUMP_RX_LOCK
00017 struct rx_peer_rx_lock {
00018     struct rx_peer_rx_lock *next;       /* Next in hash conflict or free list */
00019 #else
00020 struct rx_peer {
00021     struct rx_peer *next;       /* Next in hash conflict or free list */
00022 #endif
00023 #ifdef RX_ENABLE_LOCKS
00024     afs_kmutex_t peer_lock;     /* Lock peer */
00025 #endif                          /* RX_ENABLE_LOCKS */
00026     afs_uint32 host;            /* Remote IP address, in net byte order */
00027     u_short port;               /* Remote UDP port, in net byte order */
00028 
00029     /* interface mtu probably used for this host  -  includes RX Header */
00030     u_short ifMTU;              /* doesn't include IP header */
00031 
00032     /* For garbage collection */
00033     afs_uint32 idleWhen;        /* When the refcountwent to zero */
00034     afs_int32 refCount;         /* Reference count for this structure (rx_peerHashTable_lock) */
00035 
00036     int rtt;                    /* Smoothed round trip time, measured in milliseconds/8 */
00037     int rtt_dev;                /* Smoothed rtt mean difference, in milliseconds/4 */
00038     int nSent;                  /* Total number of distinct data packets sent, not including retransmissions */
00039     int reSends;                /* Total number of retransmissions for this peer, since this structure was created */
00040 
00041     /* the "natural" MTU, excluding IP,UDP headers, is negotiated by the endpoints */
00042     u_short natMTU;
00043     u_short maxMTU;
00044     /* negotiated maximum number of packets to send in a single datagram. */
00045     u_short maxDgramPackets;
00046     /* local maximum number of packets to send in a single datagram. */
00047     u_short ifDgramPackets;
00048     /*
00049      * MTU, cwind, and nDgramPackets are used to initialize
00050      * slow start parameters for new calls. These values are set whenever a
00051      * call sends a retransmission and at the end of each call.
00052      * congestSeq is incremented each time the congestion parameters are
00053      * changed by a call recovering from a dropped packet. A call used
00054      * MAX when updating congestion parameters if it started with the
00055      * current congestion sequence number, otherwise it uses MIN.
00056      */
00057     u_short MTU;                /* MTU for AFS 3.4a jumboGrams */
00058     u_short cwind;              /* congestion window */
00059     u_short nDgramPackets;      /* number packets per AFS 3.5 jumbogram */
00060     u_short congestSeq;         /* Changed when a call retransmits */
00061     afs_uint64 bytesSent;       /* Number of bytes sent to this peer */
00062     afs_uint64 bytesReceived;   /* Number of bytes received from this peer */
00063     struct rx_queue rpcStats;   /* rpc statistic list */
00064     int lastReachTime;          /* Last time we verified reachability */
00065     afs_int32 maxPacketSize;    /* peer packetsize hint */
00066 #ifdef AFS_RXERRQ_ENV
00067     rx_atomic_t neterrs;
00068 #endif
00069 };
00070 
00071 #endif
 All Data Structures Files Functions Variables