M port/devarp.c => port/devarp.c +2 -0
@@ 310,9 310,11 @@ arpsendpkt(uchar *unroutedip, uchar *ether, Queue *put, Block *bp)
iproute(unroutedip, ip);
if(arplookup(ip, ether)) {
+print("hit %d.%d.%d.%d\n", ip[0], ip[1], ip[2], ip[3]);
PUTNEXT(put, bp);
return;
}
+print("miss %d.%d.%d.%d\n", ip[0], ip[1], ip[2], ip[3]);
/* Send the request out to the user level arp daemon */
nbp = allocb(sizeof(ip));
M port/ipdat.h => port/ipdat.h +0 -24
@@ 3,7 3,6 @@ typedef struct Ipifc Ipifc;
typedef struct Fragq Fragq;
typedef struct Ipfrag Ipfrag;
typedef ulong Ipaddr;
-typedef struct Arpcache Arpcache;
typedef ushort Port;
typedef struct Udphdr Udphdr;
typedef struct Etherhdr Etherhdr;
@@ 380,29 379,6 @@ struct Ipfrag
ushort flen;
};
-struct Arpcache
-{
- uchar status; /* Entry status */
- uchar type; /* Entry type */
- Ipaddr ip; /* Host byte order */
- uchar eip[4]; /* Network byte order */
- uchar et[6]; /* Ethernet address for this ip */
- int age; /* Entry timeout */
- Arpcache *hash;
- Arpcache **hashhd;
- Arpcache *frwd;
- Arpcache *prev;
-};
-
-#define ARP_FREE 0
-#define ARP_OK 1
-#define ARP_ASKED 2
-#define ARP_TEMP 0
-#define ARP_PERM 1
-#define Arphashsize 32
-#define ARPHASH(p) arphash[((p[2]^p[3])%Arphashsize)]
-#define ARP_WAITMS 2500 /* Wait for arp replys */
-
#define IP_VER 0x40 /* Using IP version 4 */
#define IP_HLEN 0x05 /* Header length in characters */
#define IP_DF 0x4000 /* Don't fragment */
M port/stil.c => port/stil.c +2 -0
@@ 325,6 325,8 @@ ilprocess(Ipconv *s, Ilhdr *h, Block *bp)
oh = (Ilhdr*)bp->rptr;
oid = nhgetl(oh->ilid);
print("recvd = %d outoforder = %d\n", ic->recvd, oid);
+ if(oid > ic->recvd)
+ break;
if(oid < ic->recvd) {
ic->outoforder = bp->next;
freeb(bp);