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 =
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 =
#else /* KERNEL */
# include <sys/types.h>
# include <string.h>
+# include <stdarg.h>
# include <errno.h>
#ifdef AFS_NT40_ENV
# include <stdlib.h>
# 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);
#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
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;
}
/* Turn on reaping of idle server connections */
- rxi_ReapConnections();
+ rxi_ReapConnections(NULL, NULL, NULL);
USERPRI;
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) {
}
}
}
+#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,
* 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
#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;
}
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);
#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);
* 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;
* 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;
* 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;
/* 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;
* 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;
/* 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);
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));
}
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;
* 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;
/* 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;
}
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);
}
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);
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
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);
#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 */
};
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
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) \
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
#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>
#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;
/* to satisfy those who call setaddr */
void
-rxi_setaddr(afs_int32 x)
+rxi_setaddr(afs_uint32 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);
*/
#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];
}
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;
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;
int
-rx_getAllAddr(afs_int32 buffer[], int maxSize)
+rx_getAllAddr(afs_uint32 buffer[], int maxSize)
{
return rx_getAllAddr_internal(buffer, maxSize, 0);
}
*/
#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;
}
int
-rx_getAllAddr(afs_int32 buffer[], int maxSize)
+rx_getAllAddr(afs_uint32 buffer[], int maxSize)
{
return rx_getAllAddr_internal(buffer, maxSize, 0);
}
* 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;
} _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); \
#define MAXTHREADNAMELENGTH 64
-extern int (*registerProgram) ();
-extern int (*swapNameProgram) ();
-
int debugSelectFailure; /* # of times select failed */
/*
/* 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");
}
rxi_FreePacket(p);
}
if (swapNameProgram) {
- (*swapNameProgram) (rx_listenerPid, &name, 0);
+ (*swapNameProgram) (rx_listenerPid, name, 0);
rx_listenerPid = 0;
}
return;
rxi_FreePacket(p);
}
if (swapNameProgram) {
- (*swapNameProgram) (rx_listenerPid, &name, 0);
+ (*swapNameProgram) (rx_listenerPid, name, 0);
rx_listenerPid = 0;
}
return;
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);
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
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;
* 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)
{
return count;
}
+#endif
/*
* free packet continuation buffers into the global free packet pool
#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);
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);
*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);
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,
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 */
/* 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);
/* 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 */
#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);
extern void rx_GetIFInfo(void);
extern void rx_SetNoJumbo(void);
-
+extern void rx_SetMaxMTU(int mtu);
/* rx_xmit_nt.c */
rxi_ReadvProc(struct rx_call *call, struct iovec *iov, int *nio, int maxio,
int nbytes)
{
- struct rx_packet *rp;
int requestCount;
int nextio;
};
void
-rxi_flushtrace()
+rxi_flushtrace(void)
{
if (rxi_logfd >= 0)
write(rxi_logfd, rxi_tracebuf, rxi_tracepos);
}
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;
#endif
int
-main(argc, argv)
- char **argv;
+main(int argc, char **argv)
{
struct rx_trace ip;
int err = 0;
#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
/* xdr_refernce.c */
+extern bool_t xdr_reference(XDR *xdrs, caddr_t *pp, u_int size,
+ xdrproc_t proc);
/* xdr_stdio.c */
* 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;
}
memset(loc, 0, (int)size);
break;
+ case XDR_ENCODE:
+ break;
}
stat = (*proc) (xdrs, loc, LASTUNSIGNED);
}
return (stat);
}
-#endif /* NeXT */
+#endif /* !NeXT */
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);
}
}
}
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);
if (rxkadDisableDotCheck) {
rx_SetSecurityConfiguration(tservice, RXS_CONFIG_FLAGS,
- (void *)RXS_CONFIG_FLAGS_DISABLE_DOTCHECK,
- NULL);
+ (void *)RXS_CONFIG_FLAGS_DISABLE_DOTCHECK);
}
tservice =
if (rxkadDisableDotCheck) {
rx_SetSecurityConfiguration(service, RXS_CONFIG_FLAGS,
- (void *)RXS_CONFIG_FLAGS_DISABLE_DOTCHECK,
- NULL);
+ (void *)RXS_CONFIG_FLAGS_DISABLE_DOTCHECK);
}
service =