* IMPLIED WARRANTIES, INCLUDING, WITHOUT LIMITATION, THE IMPLIED
* WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE.
*/
+
+/* \summary: AFS RX printer */
+
/*
* This code unmangles RX packets. RX is the mutant form of RPC that AFS
* uses to communicate between clients and servers.
#include <stdio.h>
#include <stdlib.h>
#include <string.h>
-#include <tcpdump-stdinc.h>
+#include <netdissect-stdinc.h>
-#include "interface.h"
+#include "netdissect.h"
#include "addrtoname.h"
#include "extract.h"
rx_cache_next = 0;
rxent->callnum = rxh->callNumber;
- rxent->client = ip->ip_src;
- rxent->server = ip->ip_dst;
+ UNALIGNED_MEMCPY(&rxent->client, &ip->ip_src, sizeof(uint32_t));
+ UNALIGNED_MEMCPY(&rxent->server, &ip->ip_dst, sizeof(uint32_t));
rxent->dport = dport;
rxent->serviceId = rxh->serviceId;
rxent->opcode = EXTRACT_32BITS(bp + sizeof(struct rx_header));
{
int i;
struct rx_cache_entry *rxent;
- uint32_t clip = ip->ip_dst.s_addr;
- uint32_t sip = ip->ip_src.s_addr;
+ uint32_t clip;
+ uint32_t sip;
+
+ UNALIGNED_MEMCPY(&clip, &ip->ip_dst, sizeof(uint32_t));
+ UNALIGNED_MEMCPY(&sip, &ip->ip_src, sizeof(uint32_t));
/* Start the search where we last left off */
*
* "positive" and "negative" are integers which contain the number of
* positive and negative ACL's in the string. The uid/aclbits pair are
- * ASCII strings containing the UID/PTS record and and a ascii number
+ * ASCII strings containing the UID/PTS record and an ASCII number
* representing a logical OR of all the ACL permission bits
*/
bp += sizeof(struct rx_header) + 4;
switch (kauth_op) {
- case 1: /* Authenticate old */;
+ case 1: /* Authenticate old */
case 21: /* Authenticate */
case 22: /* Authenticate-V2 */
case 2: /* Change PW */