From: Andrew Deason Date: Fri, 25 Jun 2010 14:48:38 +0000 (-0500) Subject: rx: Use unsigned addresses X-Git-Tag: openafs-devel-1_5_75~74 X-Git-Url: https://git.openafs.org/?p=openafs.git;a=commitdiff_plain;h=fbe5c7f7073324fc80ee0a80ca97e8c1980a3c95 rx: Use unsigned addresses RX sometimes uses afs_int32 to represent IP addresses; make it use afs_uint32. This alters some structures in rx.h and some prototypes in rx_prototypes.h. Change-Id: I97df8a5de8f5e0355ab2056825de68bb7122e439 Reviewed-on: http://gerrit.openafs.org/2251 Reviewed-by: Jeffrey Altman Reviewed-by: Derrick Brashear Tested-by: Derrick Brashear --- diff --git a/src/rx/rx.c b/src/rx/rx.c index a8acdee..fda3f69 100644 --- a/src/rx/rx.c +++ b/src/rx/rx.c @@ -2580,7 +2580,7 @@ rxi_FindPeer(afs_uint32 host, u_short port, * server connection is created, it will be created using the supplied * index, if the index is valid for this service */ struct rx_connection * -rxi_FindConnection(osi_socket socket, afs_int32 host, +rxi_FindConnection(osi_socket socket, afs_uint32 host, u_short port, u_short serviceId, afs_uint32 cid, afs_uint32 epoch, int type, u_int securityIndex) { diff --git a/src/rx/rx.h b/src/rx/rx.h index 263db92..990dc86 100644 --- a/src/rx/rx.h +++ b/src/rx/rx.h @@ -931,7 +931,7 @@ struct rx_debugStats { }; struct rx_debugConn_vL { - afs_int32 host; + afs_uint32 host; afs_int32 cid; afs_int32 serial; afs_int32 callNumber[RX_MAXCALLS]; @@ -950,7 +950,7 @@ struct rx_debugConn_vL { }; struct rx_debugConn { - afs_int32 host; + afs_uint32 host; afs_int32 cid; afs_int32 serial; afs_int32 callNumber[RX_MAXCALLS]; diff --git a/src/rx/rx_packet.c b/src/rx/rx_packet.c index 9562b2c..1b9dbaf 100644 --- a/src/rx/rx_packet.c +++ b/src/rx/rx_packet.c @@ -101,7 +101,7 @@ extern char cml_version_number[]; static int AllocPacketBufs(int class, int num_pkts, struct rx_queue *q); static void rxi_SendDebugPacket(struct rx_packet *apacket, osi_socket asocket, - afs_int32 ahost, short aport, + afs_uint32 ahost, short aport, afs_int32 istack); #ifdef RX_ENABLE_TSFPQ @@ -1546,7 +1546,7 @@ rxi_ReadPacket(osi_socket socket, struct rx_packet *p, afs_uint32 * host, * last two pad bytes. */ struct rx_packet * -rxi_SplitJumboPacket(struct rx_packet *p, afs_int32 host, short port, +rxi_SplitJumboPacket(struct rx_packet *p, afs_uint32 host, short port, int first) { struct rx_packet *np; @@ -1777,7 +1777,7 @@ rx_mb_to_packet(amb, free, hdr_len, data_len, phandle) struct rx_packet * rxi_ReceiveDebugPacket(struct rx_packet *ap, osi_socket asocket, - afs_int32 ahost, short aport, int istack) + afs_uint32 ahost, short aport, int istack) { struct rx_debugIn tin; afs_int32 tl; @@ -2087,7 +2087,7 @@ rxi_ReceiveDebugPacket(struct rx_packet *ap, osi_socket asocket, struct rx_packet * rxi_ReceiveVersionPacket(struct rx_packet *ap, osi_socket asocket, - afs_int32 ahost, short aport, int istack) + afs_uint32 ahost, short aport, int istack) { afs_int32 tl; @@ -2116,7 +2116,7 @@ rxi_ReceiveVersionPacket(struct rx_packet *ap, osi_socket asocket, /* send a debug packet back to the sender */ static void rxi_SendDebugPacket(struct rx_packet *apacket, osi_socket asocket, - afs_int32 ahost, short aport, afs_int32 istack) + afs_uint32 ahost, short aport, afs_int32 istack) { struct sockaddr_in taddr; unsigned int i, nbytes, savelen = 0; diff --git a/src/rx/rx_prototypes.h b/src/rx/rx_prototypes.h index 35d095f..2f35bc6 100644 --- a/src/rx/rx_prototypes.h +++ b/src/rx/rx_prototypes.h @@ -100,7 +100,7 @@ extern struct rx_peer *rxi_FindPeer(afs_uint32 host, u_short port, struct rx_peer *origPeer, int create); extern struct rx_connection *rxi_FindConnection(osi_socket socket, - afs_int32 host, + afs_uint32 host, u_short port, u_short serviceId, afs_uint32 cid, @@ -534,7 +534,7 @@ extern struct rx_packet *rxi_AllocSendPacket(struct rx_call *call, extern int rxi_ReadPacket(osi_socket socket, struct rx_packet *p, afs_uint32 * host, u_short * port); extern struct rx_packet *rxi_SplitJumboPacket(struct rx_packet *p, - afs_int32 host, short port, + afs_uint32 host, short port, int first); #ifndef KERNEL extern int osi_NetSend(osi_socket socket, void *addr, struct iovec *dvec, @@ -542,11 +542,11 @@ extern int osi_NetSend(osi_socket socket, void *addr, struct iovec *dvec, #endif extern struct rx_packet *rxi_ReceiveDebugPacket(struct rx_packet *ap, osi_socket asocket, - afs_int32 ahost, short aport, + afs_uint32 ahost, short aport, int istack); extern struct rx_packet *rxi_ReceiveVersionPacket(struct rx_packet *ap, osi_socket asocket, - afs_int32 ahost, + afs_uint32 ahost, short aport, int istack); extern void rxi_SendPacket(struct rx_call *call, struct rx_connection *conn, struct rx_packet *p, int istack);