]> git.michaelhowe.org Git - packages/o/openafs.git/commitdiff
rx-prototypes-20080924
authorSimon Wilkinson <sxw@inf.ed.ac.uk>
Wed, 24 Sep 2008 22:36:29 +0000 (22:36 +0000)
committerDerrick Brashear <shadow@dementia.org>
Wed, 24 Sep 2008 22:36:29 +0000 (22:36 +0000)
LICENSE IPL10

cut down by a few thousand the warnings we get

18 files changed:
src/bozo/bosserver.c
src/ptserver/ptserver.c
src/rx/rx.c
src/rx/rx_event.c
src/rx/rx_event.h
src/rx/rx_getaddr.c
src/rx/rx_globals.h
src/rx/rx_lwp.c
src/rx/rx_packet.c
src/rx/rx_prototypes.h
src/rx/rx_rdwr.c
src/rx/rx_trace.c
src/rx/rx_trace.h
src/rx/xdr_prototypes.h
src/rx/xdr_refernce.c
src/viced/viced.c
src/vlserver/vlserver.c
src/volser/volmain.c

index 0af208a67766a3f2eceda60f7575a15d9e983edd..f2fb993da89a983fdffd83a37fb59c0342b0197c 100644 (file)
@@ -1068,8 +1068,7 @@ main(int argc, char **argv, char **envp)
     rx_SetStackSize(tservice, BOZO_LWP_STACKSIZE);     /* so gethostbyname works (in cell stuff) */
     if (rxkadDisableDotCheck) {
         rx_SetSecurityConfiguration(tservice, RXS_CONFIG_FLAGS,
-                                    (void *)RXS_CONFIG_FLAGS_DISABLE_DOTCHECK, 
-                                    NULL);
+                                    (void *)RXS_CONFIG_FLAGS_DISABLE_DOTCHECK);
     }
 
     tservice =
index 215cfe81f2f7a645af6abc584577488c1935e92c..9b33ecf29a85b9e4409293ad962b818fd958b0bd 100644 (file)
@@ -574,8 +574,7 @@ main(int argc, char **argv)
     rx_SetMaxProcs(tservice, lwps);
     if (rxkadDisableDotCheck) {
         rx_SetSecurityConfiguration(tservice, RXS_CONFIG_FLAGS,
-                                    (void *)RXS_CONFIG_FLAGS_DISABLE_DOTCHECK,
-                                    NULL);
+                                    (void *)RXS_CONFIG_FLAGS_DISABLE_DOTCHECK);
     }
 
     tservice =
index 489c4ead6ce1fa69b7b995655eff20a62724253f..52fe70b9ac146d3ce75cec6e8531415adb8325b7 100644 (file)
@@ -85,6 +85,7 @@ extern afs_int32 afs_termState;
 #else /* KERNEL */
 # include <sys/types.h>
 # include <string.h>
+# include <stdarg.h>
 # include <errno.h>
 #ifdef AFS_NT40_ENV
 # include <stdlib.h>
@@ -108,8 +109,15 @@ extern afs_int32 afs_termState;
 # include <afs/rxgen_consts.h>
 #endif /* KERNEL */
 
-int (*registerProgram) () = 0;
-int (*swapNameProgram) () = 0;
+#ifndef KERNEL
+#ifdef AFS_PTHREAD_ENV
+int (*registerProgram) (pid_t, char *) = 0;
+int (*swapNameProgram) (pid_t, const char *, char *) = 0;
+#else
+int (*registerProgram) (PROCESS, char *) = 0;
+int (*swapNameProgram) (PROCESS, const char *, char *) = 0;
+#endif
+#endif
 
 /* Local static routines */
 static void rxi_DestroyConnectionNoLock(register struct rx_connection *conn);
@@ -286,7 +294,8 @@ assert(pthread_once(&rx_once_init, rxi_InitPthread)==0)
 
 #if defined(RX_ENABLE_LOCKS) && defined(KERNEL)
 static afs_kmutex_t rx_rpc_stats;
-void rxi_StartUnlocked();
+void rxi_StartUnlocked(struct rxevent *event, void *call,
+                       void *arg1, int istack);
 #endif
 
 /* We keep a "last conn pointer" in rxi_FindConnection. The odds are 
@@ -506,7 +515,7 @@ rx_InitHost(u_int host, u_int port)
        rx_port = 0;
 #else
        struct sockaddr_in addr;
-       int addrlen = sizeof(addr);
+       socklen_t addrlen = sizeof(addr);
        if (getsockname((int)rx_socket, (struct sockaddr *)&addr, &addrlen)) {
            rx_Finalize();
            return -1;
@@ -721,7 +730,7 @@ rx_StartServer(int donateMe)
     }
 
     /* Turn on reaping of idle server connections */
-    rxi_ReapConnections();
+    rxi_ReapConnections(NULL, NULL, NULL);
 
     USERPRI;
 
@@ -1105,6 +1114,7 @@ rx_GetConnection(register struct rx_connection *conn)
     USERPRI;
 }
 
+#ifdef  AFS_GLOBAL_RXLOCK_KERNEL
 /* Wait for the transmit queue to no longer be busy. 
  * requires the call->lock to be held */
 static void rxi_WaitforTQBusy(struct rx_call *call) {
@@ -1123,6 +1133,8 @@ static void rxi_WaitforTQBusy(struct rx_call *call) {
        }
     }
 }
+#endif
+
 /* Start a new rx remote procedure call, on the specified connection.
  * If wait is set to 1, wait for a free call channel; otherwise return
  * 0.  Maxtime gives the maximum number of seconds this call may take,
@@ -2548,8 +2560,8 @@ rxi_FindConnection(osi_socket socket, register afs_int32 host,
  * containing the network address.  Both can be modified.  The return value, if
  * non-zero, indicates that the packet should be dropped.  */
 
-int (*rx_justReceived) () = 0;
-int (*rx_almostSent) () = 0;
+int (*rx_justReceived) (struct rx_packet *, struct sockaddr_in *) = 0;
+int (*rx_almostSent) (struct rx_packet *, struct sockaddr_in *) = 0;
 
 /* A packet has been received off the interface.  Np is the packet, socket is
  * the socket number it was received from (useful in determining which service
@@ -3099,9 +3111,10 @@ TooLow(struct rx_packet *ap, struct rx_call *acall)
 #endif /* KERNEL */
 
 static void
-rxi_CheckReachEvent(struct rxevent *event, struct rx_connection *conn,
-                   struct rx_call *acall)
+rxi_CheckReachEvent(struct rxevent *event, void *arg1, void *arg2)
 {
+    struct rx_connection *conn = arg1;
+    struct rx_call *acall = arg2;
     struct rx_call *call = acall;
     struct clock when, now;
     int i, waiting;
@@ -4301,9 +4314,9 @@ rxi_AckAll(struct rxevent *event, register struct rx_call *call, char *dummy)
 }
 
 void
-rxi_SendDelayedAck(struct rxevent *event, register struct rx_call *call,
-                  char *dummy)
+rxi_SendDelayedAck(struct rxevent *event, void *arg1, void *unused)
 {
+    struct rx_call *call = arg1;
 #ifdef RX_ENABLE_LOCKS
     if (event) {
        MUTEX_ENTER(&call->lock);
@@ -5156,9 +5169,11 @@ rxi_SendXmitList(struct rx_call *call, struct rx_packet **list, int len,
 #ifdef RX_ENABLE_LOCKS
 /* Call rxi_Start, below, but with the call lock held. */
 void
-rxi_StartUnlocked(struct rxevent *event, register struct rx_call *call,
-                 void *arg1, int istack)
+rxi_StartUnlocked(struct rxevent *event, 
+                 void *arg0, void *arg1, int istack)
 {
+    struct rx_call *call = arg0;
+    
     MUTEX_ENTER(&call->lock);
     rxi_Start(event, call, arg1, istack);
     MUTEX_EXIT(&call->lock);
@@ -5171,9 +5186,11 @@ rxi_StartUnlocked(struct rxevent *event, register struct rx_call *call,
  * better optimized for new packets, the usual case, now that we've
  * got rid of queues of send packets. XXXXXXXXXXX */
 void
-rxi_Start(struct rxevent *event, register struct rx_call *call,
-         void *arg1, int istack)
+rxi_Start(struct rxevent *event, 
+          void *arg0, void *arg1, int istack)
 {
+    struct rx_call *call = arg0;
+    
     struct rx_packet *p;
     register struct rx_packet *nxp;    /* Next pointer for queue_Scan */
     struct rx_peer *peer = call->conn->peer;
@@ -5648,9 +5665,9 @@ rxi_CheckCall(register struct rx_call *call)
  * keep-alive packet (if we're actually trying to keep the call alive)
  */
 void
-rxi_KeepAliveEvent(struct rxevent *event, register struct rx_call *call,
-                  char *dummy)
+rxi_KeepAliveEvent(struct rxevent *event, void *arg1, void *dummy)
 {
+    struct rx_call *call = arg1;
     struct rx_connection *conn;
     afs_uint32 now;
 
@@ -5719,8 +5736,10 @@ rxi_KeepAliveOn(register struct rx_call *call)
  * that have been delayed to throttle looping clients. */
 void
 rxi_SendDelayedConnAbort(struct rxevent *event,
-                        register struct rx_connection *conn, char *dummy)
+                        void *arg1, void *unused)
 {
+    struct rx_connection *conn = arg1;
+    
     afs_int32 error;
     struct rx_packet *packet;
 
@@ -5742,9 +5761,11 @@ rxi_SendDelayedConnAbort(struct rxevent *event,
 /* This routine is called to send call abort messages
  * that have been delayed to throttle looping clients. */
 void
-rxi_SendDelayedCallAbort(struct rxevent *event, register struct rx_call *call,
-                        char *dummy)
+rxi_SendDelayedCallAbort(struct rxevent *event, 
+                        void *arg1, void *dummy)
 {
+    struct rx_call *call = arg1;
+    
     afs_int32 error;
     struct rx_packet *packet;
 
@@ -5768,9 +5789,11 @@ rxi_SendDelayedCallAbort(struct rxevent *event, register struct rx_call *call,
  * issues a challenge to the client, which is obtained from the
  * security object associated with the connection */
 void
-rxi_ChallengeEvent(struct rxevent *event, register struct rx_connection *conn,
-                  void *arg1, int tries)
+rxi_ChallengeEvent(struct rxevent *event, 
+                  void *arg0, void *arg1, int tries)
 {
+    struct rx_connection *conn = arg0;
+    
     conn->challengeEvent = NULL;
     if (RXS_CheckAuthentication(conn->securityObject, conn) != 0) {
        register struct rx_packet *packet;
@@ -5931,7 +5954,7 @@ rxi_ComputeRoundTripTime(register struct rx_packet *p,
 /* Find all server connections that have not been active for a long time, and
  * toss them */
 void
-rxi_ReapConnections(void)
+rxi_ReapConnections(struct rxevent *unused, void *unused1, void *unused2)
 {
     struct clock now, when;
     clock_GetTime(&now);
@@ -6340,7 +6363,7 @@ rx_PrintTheseStats(FILE * file, struct rx_stats *s, int size,
 
     if (size != sizeof(struct rx_stats)) {
        fprintf(file,
-               "Unexpected size of stats structure: was %d, expected %d\n",
+               "Unexpected size of stats structure: was %d, expected %lud\n",
                size, sizeof(struct rx_stats));
     }
 
@@ -6466,7 +6489,7 @@ MakeDebugCall(osi_socket socket, afs_uint32 remoteAddr, afs_uint16 remotePort,
     register afs_int32 code;
     struct timeval tv_now, tv_wake, tv_delta;
     struct sockaddr_in taddr, faddr;
-    int faddrLen;
+    socklen_t faddrLen;
     fd_set imask;
     register char *tp;
 
index 67f115aae1c17bde03a793445c0f464e1ea86665..bcdba2930b3e825277e98f344c8b27b39779266e 100644 (file)
@@ -214,7 +214,8 @@ rxepoch_Allocate(struct clock *when)
  * units. */
 
 static struct rxevent *
-_rxevent_Post(struct clock *when, struct clock *now, void (*func) (), 
+_rxevent_Post(struct clock *when, struct clock *now, 
+             void (*func) (struct rxevent *, void *, void *, int), 
              void *arg, void *arg1, int arg2, int newargs)
 {
     register struct rxevent *ev, *evqe, *evqpr;
@@ -301,7 +302,11 @@ _rxevent_Post(struct clock *when, struct clock *now, void (*func) (),
 
     /* Record user defined event state */
     ev->eventTime = *when;
-    ev->func = func;
+    if (newargs) {
+       ev->func.newfunc = func;
+    } else {
+       ev->func.oldfunc = (void (*)(struct rxevent *, void *, void*))func;
+    }
     ev->arg = arg;
     ev->arg1 = arg1;
     ev->arg2 = arg2;
@@ -336,16 +341,21 @@ _rxevent_Post(struct clock *when, struct clock *now, void (*func) (),
 }
 
 struct rxevent *
-rxevent_Post(struct clock *when, void (*func) (), void *arg, void *arg1)
+rxevent_Post(struct clock *when, 
+            void (*func) (struct rxevent *, void *, void *), 
+            void *arg, void *arg1)
 {
     struct clock now;
     clock_Zero(&now);
-    return _rxevent_Post(when, &now, func, arg, arg1, 0, 0);
+    return _rxevent_Post(when, &now, 
+                        (void (*)(struct rxevent *, void *, void *, int))func,
+                        arg, arg1, 0, 0);
 }
 
 struct rxevent *
-rxevent_Post2(struct clock *when, void (*func) (), void *arg, void *arg1,
-             int arg2)
+rxevent_Post2(struct clock *when, 
+             void (*func) (struct rxevent *, void *, void *, int), 
+             void *arg, void *arg1, int arg2)
 {
     struct clock now;
     clock_Zero(&now);
@@ -353,14 +363,18 @@ rxevent_Post2(struct clock *when, void (*func) (), void *arg, void *arg1,
 }
 
 struct rxevent *
-rxevent_PostNow(struct clock *when, struct clock *now, void (*func) (), 
+rxevent_PostNow(struct clock *when, struct clock *now, 
+               void (*func) (struct rxevent *, void *, void *), 
                void *arg, void *arg1)
 {
-    return _rxevent_Post(when, now, func, arg, arg1, 0, 0);
+    return _rxevent_Post(when, now, 
+                        (void (*)(struct rxevent *, void *, void *, int))func,
+                        arg, arg1, 0, 0);
 }
 
 struct rxevent *
-rxevent_PostNow2(struct clock *when, struct clock *now, void (*func) (), 
+rxevent_PostNow2(struct clock *when, struct clock *now, 
+                 void (*func) (struct rxevent *, void *, void *, int), 
                 void *arg, void *arg1, int arg2)
 {
     return _rxevent_Post(when, now, func, arg, arg1, arg2, 1);
@@ -388,7 +402,7 @@ rxevent_Cancel_1(register struct rxevent *ev, register struct rx_call *call,
        clock_GetTime(&now);
        fprintf(rx_Log_event, "%d.%d: rxevent_Cancel_1(%d.%d, %lp, %lp)\n",
                (int)now.sec, (int)now.usec, (int)ev->eventTime.sec,
-               (int)ev->eventTime.usec, ev->func,
+               (int)ev->eventTime.usec, ev->func.newfunc,
                ev->arg);
     }
 #endif
@@ -477,9 +491,9 @@ rxevent_RaiseEvents(struct clock *next)
            rxevent_nPosted--;
            MUTEX_EXIT(&rxevent_lock);
            if (ev->newargs) {
-               ev->func(ev, ev->arg, ev->arg1, ev->arg2);
+               ev->func.newfunc(ev, ev->arg, ev->arg1, ev->arg2);
            } else {
-               ev->func(ev, ev->arg, ev->arg1);
+               ev->func.oldfunc(ev, ev->arg, ev->arg1);
            }
            MUTEX_ENTER(&rxevent_lock);
            queue_Append(&rxevent_free, ev);
index 4907b514527749666e686d8b6366e4ff53e5a4fd..cf8e6a4354eccfe672d9501f5669b5d45b047a00 100644 (file)
 #include "rx_clock.h"
 #endif /* KERNEL */
 
-/* An event is something that will happen at (or after) a specified clock time, unless cancelled prematurely.  The user routine (*func)() is called with arguments (event, arg, arg1) when the event occurs.  Warnings:  (1) The user supplied routine should NOT cause process preemption.   (2) The event passed to the user is still on the event queue at that time.  The user must not remove (event_Cancel) it explicitly, but the user may remove or schedule any OTHER event at this time. */
+/* An event is something that will happen at (or after) a specified clock 
+ * time, unless cancelled prematurely.  The user routine (*func)() is called 
+ * with arguments (event, arg, arg1) when the event occurs.  
+ * Warnings:  
+ *   (1) The user supplied routine should NOT cause process preemption.   
+ *   (2) The event passed to the user is still on the event queue at that 
+ *       time.  The user must not remove (event_Cancel) it explicitly, but 
+ *       the user may remove or schedule any OTHER event at this time. 
+ */
 
 struct rxevent {
     struct rx_queue junk;      /* Events are queued */
     struct clock eventTime;    /* When this event times out (in clock.c units) */
-    void (*func) ();           /* Function to call when this expires */
-    char *arg;                 /* Argument to the function */
-    char *arg1;                        /* Another argument */
+    union {
+       void (*oldfunc) (struct rxevent *, void *, void *); 
+       void (*newfunc) (struct rxevent *, void *, void *, int);
+    } func;                    /* Function to call when this expires */
+    void *arg;                 /* Argument to the function */
+    void *arg1;                        /* Another argument */
     int arg2;                  /* An integer argument */
     int newargs;               /* Nonzero if new-form arguments should be used */
 };
@@ -43,14 +54,20 @@ struct rxepoch {
     struct rx_queue events;    /* list of events for this epoch */
 };
 
-/* Some macros to make macros more reasonable (this allows a block to be used within a macro which does not cause if statements to screw up).   That is, you can use "if (...) macro_name(); else ...;" without having things blow up on the semi-colon. */
+/* Some macros to make macros more reasonable (this allows a block to be 
+ * used within a macro which does not cause if statements to screw up).   
+ * That is, you can use "if (...) macro_name(); else ...;" without 
+ * having things blow up on the semi-colon. */
 
 #ifndef BEGIN
 #define BEGIN do {
 #define END } while(0)
 #endif
 
-/* This routine must be called to initialize the event package.  nEvents is the number of events to allocate in a batch whenever more are needed.  If this is 0, a default number (10) will be allocated. */
+/* This routine must be called to initialize the event package.  
+ * nEvents is the number of events to allocate in a batch whenever 
+ * more are needed.  If this is 0, a default number (10) will be 
+ * allocated. */
 #if 0
 extern void rxevent_Init( /* nEvents, scheduler */ );
 #endif
@@ -60,12 +77,16 @@ extern void rxevent_Init( /* nEvents, scheduler */ );
 extern void exevent_NextEvent( /* when */ );
 #endif
 
-/* Arrange for the indicated event at the appointed time.  When is a "struct clock", in the clock.c time base */
+/* Arrange for the indicated event at the appointed time.  When is a 
+ * "struct clock", in the clock.c time base */
 #if 0
 extern struct rxevent *rxevent_Post( /* when, func, arg, arg1 */ );
 #endif
 
-/* Remove the indicated event from the event queue.  The event must be pending.  Also see the warning, above.  The event pointer supplied is zeroed. */
+/* Remove the indicated event from the event queue.  The event must be 
+ * pending.  Also see the warning, above.  The event pointer supplied 
+ * is zeroed. 
+ */
 #ifdef RX_ENABLE_LOCKS
 #ifdef RX_REFCOUNT_CHECK
 #define        rxevent_Cancel(event_ptr, call, type)                       \
@@ -94,7 +115,11 @@ extern struct rxevent *rxevent_Post( /* when, func, arg, arg1 */ );
        END
 #endif /* RX_ENABLE_LOCKS */
 
-/* The actions specified for each event that has reached the current clock time will be taken.  The current time returned by GetTime is used (warning:  this may be an old time if the user has not called clock_NewTime) */
+/* The actions specified for each event that has reached the current clock 
+ * time will be taken.  The current time returned by GetTime is used 
+ * (warning:  this may be an old time if the user has not called 
+ * clock_NewTime) 
+ */
 #if 0
 extern int rxevent_RaiseEvents();
 #endif
index e5f04ae99bae76e14997466f9a5cb7bb017879c5..57740e910f5486211e880c5c6327318834bdb195 100644 (file)
@@ -21,6 +21,7 @@ RCSID
 #include <net/if.h>
 #include <netinet/in.h>
 #include <sys/ioctl.h>
+#include <string.h>
 #if defined(AFS_DARWIN_ENV) || defined(AFS_XBSD_ENV)
 #include <sys/sysctl.h>
 #include <net/route.h>
@@ -47,17 +48,17 @@ RCSID
 #ifdef KERNEL
 /* only used for generating random noise */
 
-afs_int32 rxi_tempAddr = 0;    /* default attempt */
+afs_uint32 rxi_tempAddr = 0;   /* default attempt */
 
 /* set the advisory noise */
 void
-rxi_setaddr(afs_int32 x)
+rxi_setaddr(afs_uint32 x)
 {
     rxi_tempAddr = x;
 }
 
 /* get approx to net addr */
-afs_int32
+afs_uint32
 rxi_getaddr(void)
 {
     return rxi_tempAddr;
@@ -69,7 +70,7 @@ rxi_getaddr(void)
 
 /* to satisfy those who call setaddr */
 void
-rxi_setaddr(afs_int32 x)
+rxi_setaddr(afs_uint32 x)
 {
 }
 
@@ -86,10 +87,10 @@ rxi_setaddr(afs_int32 x)
 /* Return our internet address as a long in network byte order.  Returns zero
  * if it can't find one.
  */
-afs_int32
+afs_uint32
 rxi_getaddr(void)
 {
-    afs_int32 buffer[1024];
+    afs_uint32 buffer[1024];
     int count;
 
     count = rx_getAllAddr(buffer, 1024);
@@ -139,7 +140,7 @@ rt_xaddrs(caddr_t cp, caddr_t cplim, struct rt_addrinfo *rtinfo)
 */
 #if defined(AFS_DARWIN_ENV) || defined(AFS_XBSD_ENV)
 int
-rx_getAllAddr_internal(afs_int32 buffer[], int maxSize, int loopbacks)
+rx_getAllAddr_internal(afs_uint32 buffer[], int maxSize, int loopbacks)
 {
     size_t needed;
     int mib[6];
@@ -222,8 +223,8 @@ rx_getAllAddr_internal(afs_int32 buffer[], int maxSize, int loopbacks)
 }
 
 int
-rxi_getAllAddrMaskMtu(afs_int32 addrBuffer[], afs_int32 maskBuffer[],
-                     afs_int32 mtuBuffer[], int maxSize)
+rxi_getAllAddrMaskMtu(afs_uint32 addrBuffer[], afs_uint32 maskBuffer[],
+                     afs_uint32 mtuBuffer[], int maxSize)
 {
     int s;
 
@@ -234,7 +235,7 @@ rxi_getAllAddrMaskMtu(afs_int32 addrBuffer[], afs_int32 maskBuffer[],
     struct sockaddr_dl *sdl;
     struct rt_addrinfo info;
     char *buf, *lim, *next;
-    int count = 0, addrcount = 0, i;
+    int count = 0, addrcount = 0;
 
     mib[0] = CTL_NET;
     mib[1] = PF_ROUTE;
@@ -324,7 +325,7 @@ rxi_getAllAddrMaskMtu(afs_int32 addrBuffer[], afs_int32 maskBuffer[],
 
 
 int
-rx_getAllAddr(afs_int32 buffer[], int maxSize)
+rx_getAllAddr(afs_uint32 buffer[], int maxSize)
 {
     return rx_getAllAddr_internal(buffer, maxSize, 0);
 }
@@ -333,7 +334,7 @@ rx_getAllAddr(afs_int32 buffer[], int maxSize)
 */
 #else
 static int
-rx_getAllAddr_internal(afs_int32 buffer[], int maxSize, int loopbacks)
+rx_getAllAddr_internal(afs_uint32 buffer[], int maxSize, int loopbacks)
 {
     int s;
     int i, len, count = 0;
@@ -409,7 +410,7 @@ rx_getAllAddr_internal(afs_int32 buffer[], int maxSize, int loopbacks)
 }
 
 int
-rx_getAllAddr(afs_int32 buffer[], int maxSize)
+rx_getAllAddr(afs_uint32 buffer[], int maxSize)
 {
     return rx_getAllAddr_internal(buffer, maxSize, 0);
 }
@@ -421,8 +422,8 @@ rx_getAllAddr(afs_int32 buffer[], int maxSize)
  * by afsi_SetServerIPRank().
  */
 int
-rxi_getAllAddrMaskMtu(afs_int32 addrBuffer[], afs_int32 maskBuffer[],
-                     afs_int32 mtuBuffer[], int maxSize)
+rxi_getAllAddrMaskMtu(afs_uint32 addrBuffer[], afs_uint32 maskBuffer[],
+                     afs_uint32 mtuBuffer[], int maxSize)
 {
     int s;
     int i, len, count = 0;
index 53fd05811080c6d81eba3229b489a32faa715da6..371976cc79040cc63ef9d8059787017c717dd1e5 100644 (file)
@@ -182,7 +182,7 @@ typedef struct rx_ts_info_t {
     } _FPQ;
     struct rx_packet * local_special_packet;
 } rx_ts_info_t;
-EXT struct rx_ts_info_t * rx_ts_info_init();   /* init function for thread-specific data struct */
+EXT struct rx_ts_info_t * rx_ts_info_init(void);   /* init function for thread-specific data struct */
 #define RX_TS_INFO_GET(ts_info_p) \
     do { \
         ts_info_p = (struct rx_ts_info_t*)pthread_getspecific(rx_ts_info_key); \
index 49c7ac9f5525775df3b709d2a7fffce2130347cb..4585560a7b63ca684934722002382b5c280c6f3f 100644 (file)
@@ -50,9 +50,6 @@ RCSID
 
 #define MAXTHREADNAMELENGTH 64
 
-extern int (*registerProgram) ();
-extern int (*swapNameProgram) ();
-
 int debugSelectFailure;                /* # of times select failed */
 
 /*
@@ -138,7 +135,7 @@ rxi_StartListener(void)
     /* Priority of listener should be high, so it can keep conns alive */
 #define        RX_LIST_STACK   24000
     LWP_CreateProcess(rx_ListenerProc, RX_LIST_STACK, LWP_MAX_PRIORITY,
-                     (void *)0, "rx_Listener", &rx_listenerPid);
+                     NULL, "rx_Listener", &rx_listenerPid);
     if (registerProgram)
        (*registerProgram) (rx_listenerPid, "listener");
 }
@@ -283,7 +280,7 @@ rxi_ListenerProc(fd_set * rfds, int *tnop, struct rx_call **newcallp)
                            rxi_FreePacket(p);
                        }
                        if (swapNameProgram) {
-                           (*swapNameProgram) (rx_listenerPid, &name, 0);
+                           (*swapNameProgram) (rx_listenerPid, name, 0);
                            rx_listenerPid = 0;
                        }
                        return;
@@ -303,7 +300,7 @@ rxi_ListenerProc(fd_set * rfds, int *tnop, struct rx_call **newcallp)
                            rxi_FreePacket(p);
                        }
                        if (swapNameProgram) {
-                           (*swapNameProgram) (rx_listenerPid, &name, 0);
+                           (*swapNameProgram) (rx_listenerPid, name, 0);
                            rx_listenerPid = 0;
                        }
                        return;
index 398ca066d2e733efe1e58de6f88f98bc75dc4b57..4175a1c40c28c3034b7f91c25ed06e6cc4c6a4d5 100644 (file)
@@ -101,7 +101,6 @@ static int rxdb_fileID = RXDB_FILE_RX_PACKET;
 struct rx_packet *rx_mallocedP = 0;
 
 extern char cml_version_number[];
-extern int (*rx_almostSent) ();
 
 static int AllocPacketBufs(int class, int num_pkts, struct rx_queue *q);
 
@@ -112,9 +111,10 @@ static void rxi_SendDebugPacket(struct rx_packet *apacket, osi_socket asocket,
 static int rxi_FreeDataBufsToQueue(struct rx_packet *p, 
                                   afs_uint32 first, 
                                   struct rx_queue * q);
+#ifdef RX_ENABLE_TSFPQ
 static int
 rxi_FreeDataBufsTSFPQ(struct rx_packet *p, afs_uint32 first, int flush_global);
-
+#endif
 
 /* some rules about packets:
  * 1.  When a packet is allocated, the final iov_buf contains room for
@@ -303,7 +303,10 @@ static int
 AllocPacketBufs(int class, int num_pkts, struct rx_queue * q)
 {
     struct rx_packet *c;
-    int i, overq = 0;
+    int i;
+#ifdef KERNEL
+    int overq = 0;
+#endif
     SPLVAR;
 
     NETPRI;
@@ -818,6 +821,7 @@ rxi_FreePacketTSFPQ(struct rx_packet *p, int flush_global)
  * returns:
  *   number of continuation buffers freed
  */
+#ifndef RX_ENABLE_TSFPQ
 static int
 rxi_FreeDataBufsToQueue(struct rx_packet *p, afs_uint32 first, struct rx_queue * q)
 {
@@ -838,6 +842,7 @@ rxi_FreeDataBufsToQueue(struct rx_packet *p, afs_uint32 first, struct rx_queue *
 
     return count;
 }
+#endif
 
 /*
  * free packet continuation buffers into the global free packet pool
index 2a27fb7d9aeafa3ca7ebe7df03dac89721671540..e07e659fc7b54c1d1f4f95054a40f941072a4237 100644 (file)
 #define _RX_PROTOTYPES_H
 
 /* rx.c */
+#ifndef KERNEL
+#ifndef AFS_PTHREAD_ENV
+extern int (*registerProgram) (PROCESS, char *);
+extern int (*swapNameProgram) (PROCESS, const char *, char *);
+#endif
+#endif
+extern int (*rx_justReceived) (struct rx_packet *, struct sockaddr_in *);
+extern int (*rx_almostSent) (struct rx_packet *, struct sockaddr_in *);
+
+
 extern void rx_SetEpoch(afs_uint32 epoch);
 extern int rx_Init(u_int port);
 extern int rx_InitHost(u_int host, u_int port);
@@ -122,7 +132,7 @@ extern void rxi_AttachServerProc(register struct rx_call *call,
 extern void rxi_AckAll(struct rxevent *event, register struct rx_call *call,
                       char *dummy);
 extern void rxi_SendDelayedAck(struct rxevent *event,
-                              register struct rx_call *call, char *dummy);
+                              void *call /* struct rx_call *call */, void *dummy);
 extern void rxi_ClearTransmitQueue(register struct rx_call *call,
                                   register int force);
 extern void rxi_ClearReceiveQueue(register struct rx_call *call);
@@ -142,9 +152,10 @@ extern struct rx_packet *rxi_SendAck(register struct rx_call *call, register str
                                     *optionalPacket, int serial, int reason,
                                     int istack);
 extern void rxi_StartUnlocked(struct rxevent *event,
-                             register struct rx_call *call,
+                             void *call, /* register struct rx_call */
                              void *arg1, int istack);
-extern void rxi_Start(struct rxevent *event, register struct rx_call *call,
+extern void rxi_Start(struct rxevent *event, 
+                     void *call, /* register struct rx_call */
                      void *arg1, int istack);
 extern void rxi_Send(register struct rx_call *call,
                     register struct rx_packet *p, int istack);
@@ -154,23 +165,25 @@ extern int rxi_CheckCall(register struct rx_call *call, int haveCTLock);
 extern int rxi_CheckCall(register struct rx_call *call);
 #endif /* RX_ENABLE_LOCKS */
 extern void rxi_KeepAliveEvent(struct rxevent *event,
-                              register struct rx_call *call, char *dummy);
+                              void *call /* struct rx_call *call */, 
+                              void *dummy);
 extern void rxi_ScheduleKeepAliveEvent(register struct rx_call *call);
 extern void rxi_KeepAliveOn(register struct rx_call *call);
 extern void rxi_SendDelayedConnAbort(struct rxevent *event,
-                                    register struct rx_connection *conn,
-                                    char *dummy);
+                                    void *conn, /* struct rx_connection *conn */
+                                    void *dummy);
 extern void rxi_SendDelayedCallAbort(struct rxevent *event,
-                                    register struct rx_call *call,
-                                    char *dummy);
+                                    void *call, /* struct rx_call *call */
+                                    void *dummy);
 extern void rxi_ChallengeEvent(struct rxevent *event,
-                              register struct rx_connection *conn,
+                              void *conn, /* struct rx_connection *conn */
                               void *arg1, int atries);
 extern void rxi_ChallengeOn(register struct rx_connection *conn);
 extern void rxi_ComputeRoundTripTime(register struct rx_packet *p,
                                     register struct clock *sentp,
                                     register struct rx_peer *peer);
-extern void rxi_ReapConnections(void);
+extern void rxi_ReapConnections(struct rxevent *unused, void *unused1, 
+                               void *unused2);
 extern int rxs_Release(struct rx_securityClass *aobj);
 #ifndef KERNEL
 extern void rx_PrintTheseStats(FILE * file, struct rx_stats *s, int size,
@@ -247,6 +260,9 @@ extern void rx_clearProcessRPCStats(afs_uint32 clearFlag);
 extern void rx_clearPeerRPCStats(afs_uint32 clearFlag);
 extern void rx_SetRxStatUserOk(int (*proc) (struct rx_call * call));
 extern int rx_RxStatUserOk(struct rx_call *call);
+extern afs_int32 rx_SetSecurityConfiguration(struct rx_service *service,
+                                            rx_securityConfigVariables type,
+                                            void *value);
 
 
 /* old style till varargs */
@@ -302,14 +318,16 @@ extern struct rxevent *rxevent_Post(struct clock *when,
 /* this func seems to be called with tons of different style routines, need to look
 at another time. */
 #else
-extern struct rxevent *rxevent_Post(struct clock *when, void (*func) (),
+extern struct rxevent *rxevent_Post(struct clock *when, 
+                                   void (*func) (struct rxevent *, void *, void *),
                                    void *arg, void *arg1);
-extern struct rxevent *rxevent_Post2(struct clock *when, void (*func) (),
+extern struct rxevent *rxevent_Post2(struct clock *when, 
+                                   void (*func) (struct rxevent *, void *, void *, int),
                                    void *arg, void *arg1, int arg2);
 extern struct rxevent *rxevent_PostNow(struct clock *when, struct clock *now,
-                                      void (*func) (), void *arg, void *arg1);
+                                      void (*func) (struct rxevent *, void *, void *), void *arg, void *arg1);
 extern struct rxevent *rxevent_PostNow2(struct clock *when, struct clock *now,
-                                       void (*func) (), void *arg, 
+                                       void (*func) (struct rxevent *, void *, void *, int), void *arg, 
                                        void *arg1, int arg2);
 #endif
 extern void shutdown_rxevent(void);
@@ -324,8 +342,13 @@ extern int rxevent_RaiseEvents(struct clock *next);
 
 
 /* rx_getaddr.c */
-extern void rxi_setaddr(afs_int32 x);
-extern afs_int32 rxi_getaddr(void);
+extern void rxi_setaddr(afs_uint32 x);
+extern afs_uint32 rxi_getaddr(void);
+extern int rx_getAllAddr(afs_uint32 * buffer, int maxSize);
+extern int rxi_getAllAddrMaskMtu(afs_uint32 addrBuffer[], 
+                                afs_uint32 maskBuffer[],
+                                afs_uint32 mtuBuffer[],
+                                int maxSize);
 
 /* rx_globals.c */
 
@@ -584,7 +607,6 @@ extern pthread_mutex_t rx_if_mutex;
 #endif
 extern osi_socket rxi_GetUDPSocket(u_short port);
 extern void osi_AssertFailU(const char *expr, const char *file, int line);
-extern int rx_getAllAddr(afs_int32 * buffer, int maxSize);
 extern void rxi_InitPeerParams(struct rx_peer *pp);
 extern int rxi_HandleSocketError(int socket);
 
@@ -595,7 +617,7 @@ extern void osi_Free(void *x, afs_int32 size);
 
 extern void rx_GetIFInfo(void);
 extern void rx_SetNoJumbo(void);
-
+extern void rx_SetMaxMTU(int mtu);
 
 /* rx_xmit_nt.c */
 
index c2df01c79b76a4746443daca9eb9192dc6d9061c..a5700e90ac8fc42bc4403f19f2fc6c5b0016d419 100644 (file)
@@ -553,7 +553,6 @@ int
 rxi_ReadvProc(struct rx_call *call, struct iovec *iov, int *nio, int maxio,
              int nbytes)
 {
-    struct rx_packet *rp;
     int requestCount;
     int nextio;
 
index 37b85d6e11a6e295bb7e1e517be9be1b8d828879..79c6274217734fbaceefd35f08784025e2713a3a 100644 (file)
@@ -47,7 +47,7 @@ struct rx_trace {
 };
 
 void
-rxi_flushtrace()
+rxi_flushtrace(void)
 {
     if (rxi_logfd >= 0)
        write(rxi_logfd, rxi_tracebuf, rxi_tracepos);
@@ -55,9 +55,7 @@ rxi_flushtrace()
 }
 
 void
-rxi_calltrace(event, call)
-     unsigned int event;
-     struct rx_call *call;
+rxi_calltrace(unsigned int event, struct rx_call *call)
 {
     struct clock now;
     struct rx_trace rxtinfo;
@@ -130,8 +128,7 @@ rxi_calltrace(event, call)
 #endif
 
 int
-main(argc, argv)
-     char **argv;
+main(int argc, char **argv)
 {
     struct rx_trace ip;
     int err = 0;
index b5fe674c83edb903820f7fd84826b083cee313d3..39dc5177c8eee947fff1468852616e0f64108996 100644 (file)
@@ -14,7 +14,8 @@
 #define rxi_calltrace(a,b)
 #define rxi_flushtrace()
 #else
-extern void rxi_calltrace(), rxi_flushtrace();
+extern void rxi_calltrace(unsigned int event, struct rx_call *call);
+extern void rxi_flushtrace(void);
 
 #define RX_CALL_ARRIVAL 0
 #define RX_CALL_START 1
index d8321006b37fc6c2354168244a95bccce48b123d..c13186c1e375d43f05746ec9b36ace44893cb8f9 100644 (file)
@@ -83,6 +83,8 @@ extern bool_t xdrrec_endofrecord(XDR * xdrs, bool_t sendnow);
 
 /* xdr_refernce.c */
 
+extern bool_t xdr_reference(XDR *xdrs, caddr_t *pp, u_int size, 
+                           xdrproc_t proc);
 
 /* xdr_stdio.c */
 
index f8aa058802a960e24347674039d572632eb83d5f..933def048a5a0f1e057b4000f0ea05d563e81f72 100644 (file)
@@ -59,11 +59,10 @@ RCSID
  * proc is the routine to handle the referenced structure.
  */
 bool_t
-xdr_reference(xdrs, pp, size, proc)
-     register XDR *xdrs;
-     caddr_t *pp;              /* the pointer to work on */
-     u_int size;               /* size of the object pointed to */
-     xdrproc_t proc;           /* xdr routine to handle the object */
+xdr_reference(register XDR *xdrs, 
+             caddr_t *pp, /* the pointer to work on */
+             u_int size, /* size of the object pointed to */
+             xdrproc_t proc)  /* xdr routine to handle the object */
 {
     register caddr_t loc = *pp;
     register bool_t stat;
@@ -80,6 +79,8 @@ xdr_reference(xdrs, pp, size, proc)
            }
            memset(loc, 0, (int)size);
            break;
+       case XDR_ENCODE:
+           break;
        }
 
     stat = (*proc) (xdrs, loc, LASTUNSIGNED);
@@ -90,4 +91,4 @@ xdr_reference(xdrs, pp, size, proc)
     }
     return (stat);
 }
-#endif /* NeXT */
+#endif /* !NeXT */
index 9a7d039f9cefab69c8702230d72160a468979537..4c8f0064496b5883b149dbdb6abc77884a27bcc0 100644 (file)
@@ -260,7 +260,8 @@ CheckDescriptors(void *unused)
     for (i = 0; i < tsize; i++) {
        if (afs_fstat(i, &status) != -1) {
            printf("%d: dev %x, inode %u, length %u, type/mode %x\n", i,
-                  status.st_dev, status.st_ino, status.st_size,
+                  status.st_dev, status.st_ino, 
+                  (unsigned int) status.st_size,
                   status.st_mode);
        }
     }
@@ -2099,8 +2100,7 @@ main(int argc, char *argv[])
     }
     if (rxkadDisableDotCheck) {
         rx_SetSecurityConfiguration(tservice, RXS_CONFIG_FLAGS,
-                                    (void *)RXS_CONFIG_FLAGS_DISABLE_DOTCHECK,
-                                    NULL);
+                                    (void *)RXS_CONFIG_FLAGS_DISABLE_DOTCHECK);
     }
     rx_SetMinProcs(tservice, 3);
     rx_SetMaxProcs(tservice, lwps);
index dcc25e8c5c6d9fccc7f291a292d63ec0664977e9..a615fd1fbc7b72032d08539d442b27e79076c852 100644 (file)
@@ -401,8 +401,7 @@ main(argc, argv)
 
     if (rxkadDisableDotCheck) {
         rx_SetSecurityConfiguration(tservice, RXS_CONFIG_FLAGS,
-                                    (void *)RXS_CONFIG_FLAGS_DISABLE_DOTCHECK,
-                                    NULL);
+                                    (void *)RXS_CONFIG_FLAGS_DISABLE_DOTCHECK);
     }
 
     tservice =
index 240f7451ace30ff3db847a27dc6658dc1b775ab8..bb9cd921472ae9c580ad380d9b6e70c2bc7a346e 100644 (file)
@@ -537,8 +537,7 @@ main(int argc, char **argv)
 
     if (rxkadDisableDotCheck) {
         rx_SetSecurityConfiguration(service, RXS_CONFIG_FLAGS,
-                                    (void *)RXS_CONFIG_FLAGS_DISABLE_DOTCHECK,
-                                    NULL);
+                                    (void *)RXS_CONFIG_FLAGS_DISABLE_DOTCHECK);
     }
 
     service =