Various changes for portability to FreeBSD.

Added "R" to control service resolution.
This commit is contained in:
pdw
2002-10-18 11:51:47 +00:00
parent 94b6ab8fc6
commit 45ccb4e4b9
7 changed files with 21 additions and 3 deletions

View File

@@ -7,6 +7,8 @@
#include <stdio.h>
#include <stdlib.h>
#include <time.h>
#include <sys/types.h>
#include <sys/socket.h>
#include <sys/ioctl.h>
#include <net/if.h>
#include <net/ethernet.h>
@@ -130,7 +132,7 @@ void assign_addr_pair(addr_pair* ap, struct ip* iptr, int flip) {
unsigned short int dst_port = 0;
/* Does this protocol use ports? */
if(iptr->ip_p == SOL_TCP || iptr->ip_p == SOL_UDP) {
if(iptr->ip_p == IPPROTO_TCP || iptr->ip_p == IPPROTO_UDP) {
/* We take a slight liberty here by treating UDP the same as TCP */
/* Find the TCP/UDP header */