# endif
# include "h/socket.h"
# if !defined(AFS_SUN5_ENV) && !defined(AFS_LINUX20_ENV) && !defined(AFS_HPUX110_ENV)
-# if !defined(AFS_OSF_ENV) && !defined(AFS_AIX41_ENV)
+# if !defined(AFS_AIX41_ENV)
# include "sys/mount.h" /* it gets pulled in by something later anyway */
# endif
# include "h/mbuf.h"
static void
rxi_FreePacketNoLock(struct rx_packet *p)
{
- dpf(("Free %"AFS_PTR_FMT"\n", p));
+ dpf(("Free %p\n", p));
RX_FPQ_MARK_FREE(p);
rx_nFreePackets++;
rxi_FreePacketTSFPQ(struct rx_packet *p, int flush_global)
{
struct rx_ts_info_t * rx_ts_info;
- dpf(("Free %"AFS_PTR_FMT"\n", p));
+ dpf(("Free %p\n", p));
RX_TS_INFO_GET(rx_ts_info);
RX_TS_FPQ_CHECKIN(rx_ts_info,p);
RX_TS_FPQ_CHECKOUT(rx_ts_info,p);
- dpf(("Alloc %"AFS_PTR_FMT", class %d\n", p, class));
+ dpf(("Alloc %p, class %d\n", p, class));
/* have to do this here because rx_FlushWrite fiddles with the iovs in
opr_queue_Remove(&p->entry);
RX_FPQ_MARK_USED(p);
- dpf(("Alloc %"AFS_PTR_FMT", class %d\n", p, class));
+ dpf(("Alloc %p, class %d\n", p, class));
/* have to do this here because rx_FlushWrite fiddles with the iovs in
RX_TS_FPQ_CHECKOUT(rx_ts_info,p);
- dpf(("Alloc %"AFS_PTR_FMT", class %d\n", p, class));
+ dpf(("Alloc %p, class %d\n", p, class));
/* have to do this here because rx_FlushWrite fiddles with the iovs in
* order to truncate outbound packets. In the near future, may need
* last two pad bytes. */
struct rx_packet *
-rxi_SplitJumboPacket(struct rx_packet *p, afs_uint32 host, short port,
- int first)
+rxi_SplitJumboPacket(struct rx_packet *p)
{
struct rx_packet *np;
struct rx_jumboHeader *jp;
np->header = p->header;
np->header.serial = p->header.serial + 1;
np->header.seq = p->header.seq + 1;
+ np->header.userStatus = 0;
np->header.flags = jp->flags;
np->header.spare = jp->cksum;
for (tc = rx_connHashTable[i]; tc; tc = tc->next) {
if ((all || rxi_IsConnInteresting(tc))
&& tin.index-- <= 0) {
+ int do_secstats = 0;
tconn.host = tc->peer->host;
tconn.port = tc->peer->port;
tconn.cid = htonl(tc->cid);
tconn.natMTU = htonl(tc->peer->natMTU);
tconn.error = htonl(tc->error);
- tconn.flags = tc->flags;
+ tconn.flags = (u_char) (tc->flags & 0xff); /* compat. */
tconn.type = tc->type;
tconn.securityIndex = tc->securityIndex;
if (tc->securityObject) {
- RXS_GetStats(tc->securityObject, tc,
- &tconn.secStats);
+ int code;
+ code = RXS_GetStats(tc->securityObject, tc,
+ &tconn.secStats);
+ if (code == 0) {
+ do_secstats = 1;
+ }
+ }
+ if (do_secstats) {
#define DOHTONL(a) (tconn.secStats.a = htonl(tconn.secStats.a))
#define DOHTONS(a) (tconn.secStats.a = htons(tconn.secStats.a))
DOHTONL(flags);
sizeof(tconn.secStats.sparel) /
sizeof(afs_int32); i++)
DOHTONL(sparel[i]);
+ } else {
+ memset(&tconn.secStats, 0, sizeof(tconn.secStats));
}
MUTEX_EXIT(&rx_connHashTable_lock);
if (!waslocked)
AFS_GLOCK();
afs_Trace1(afs_iclSetp, CM_TRACE_TIMESTAMP, ICL_TYPE_STRING,
- "before osi_NetSend()");
+ "before rxi_NetSend()");
AFS_GUNLOCK();
}
#else
#endif
#endif
/* debug packets are not reliably delivered, hence the cast below. */
- (void)osi_NetSend(asocket, &taddr, apacket->wirevec, apacket->niovecs,
+ (void)rxi_NetSend(asocket, &taddr, apacket->wirevec, apacket->niovecs,
apacket->length + RX_HEADER_SIZE, istack);
#ifdef KERNEL
#ifdef RX_KERNEL_TRACE
if (ICL_SETACTIVE(afs_iclSetp)) {
AFS_GLOCK();
afs_Trace1(afs_iclSetp, CM_TRACE_TIMESTAMP, ICL_TYPE_STRING,
- "after osi_NetSend()");
+ "after rxi_NetSend()");
if (!waslocked)
AFS_GUNLOCK();
}
if (!waslocked)
AFS_GLOCK();
afs_Trace1(afs_iclSetp, CM_TRACE_TIMESTAMP, ICL_TYPE_STRING,
- "before osi_NetSend()");
+ "before rxi_NetSend()");
AFS_GUNLOCK();
}
#else
#endif
#endif
if ((code =
- osi_NetSend(socket, &addr, p->wirevec, p->niovecs,
+ rxi_NetSend(socket, &addr, p->wirevec, p->niovecs,
p->length + RX_HEADER_SIZE, istack)) != 0) {
/* send failed, so let's hurry up the resend, eh? */
if (rx_stats_active)
if (ICL_SETACTIVE(afs_iclSetp)) {
AFS_GLOCK();
afs_Trace1(afs_iclSetp, CM_TRACE_TIMESTAMP, ICL_TYPE_STRING,
- "after osi_NetSend()");
+ "after rxi_NetSend()");
if (!waslocked)
AFS_GUNLOCK();
}
#endif
#ifdef RXDEBUG
}
- dpf(("%c %d %s: %x.%u.%u.%u.%u.%u.%u flags %d, packet %"AFS_PTR_FMT" len %d\n",
+ dpf(("%c %d %s: %x.%u.%u.%u.%u.%u.%u flags %d, packet %p len %d\n",
deliveryType, p->header.serial, rx_packetTypes[p->header.type - 1], ntohl(peer->host),
ntohs(peer->port), p->header.serial, p->header.epoch, p->header.cid, p->header.callNumber,
p->header.seq, p->header.flags, p, p->length));
AFS_GUNLOCK();
#endif
if ((code =
- osi_NetSend(socket, &addr, &wirevec[0], len + 1, length,
+ rxi_NetSend(socket, &addr, &wirevec[0], len + 1, length,
istack)) != 0) {
/* send failed, so let's hurry up the resend, eh? */
if (rx_stats_active)
osi_Assert(p != NULL);
- dpf(("%c %d %s: %x.%u.%u.%u.%u.%u.%u flags %d, packet %"AFS_PTR_FMT" len %d\n",
+ dpf(("%c %d %s: %x.%u.%u.%u.%u.%u.%u flags %d, packet %p len %d\n",
deliveryType, p->header.serial, rx_packetTypes[p->header.type - 1], ntohl(peer->host),
ntohs(peer->port), p->header.serial, p->header.epoch, p->header.cid, p->header.callNumber,
p->header.seq, p->header.flags, p, p->length));
addr.sin_len = sizeof(struct sockaddr_in);
#endif
- osi_NetSend(socket, &addr, iov, 2,
+ rxi_NetSend(socket, &addr, iov, 2,
sizeof(struct rx_header) + sizeof(error), istack);
}
p->header.seq = 0;
p->header.epoch = conn->epoch;
p->header.type = type;
+ p->header.userStatus = 0;
p->header.flags = 0;
if (conn->type == RX_CLIENT_CONNECTION)
p->header.flags |= RX_CLIENT_INITIATED;
p->header.seq = seq;
p->header.epoch = conn->epoch;
p->header.type = RX_PACKET_TYPE_DATA;
+ p->header.userStatus = 0;
p->header.flags = 0;
p->header.spare = 0;
if (conn->type == RX_CLIENT_CONNECTION)