lsock.c (153881) | lsock.c (161357) |
---|---|
1/* $FreeBSD: head/contrib/ipfilter/ipsend/lsock.c 153881 2005-12-30 11:52:26Z guido $ */ | 1/* $FreeBSD: head/contrib/ipfilter/ipsend/lsock.c 161357 2006-08-16 12:23:02Z guido $ */ |
2 3/* 4 * lsock.c (C) 1995-1998 Darren Reed 5 * 6 * See the IPFILTER.LICENCE file for details on licencing. 7 * 8 */ 9#if !defined(lint) 10static const char sccsid[] = "@(#)lsock.c 1.2 1/11/96 (C)1995 Darren Reed"; | 2 3/* 4 * lsock.c (C) 1995-1998 Darren Reed 5 * 6 * See the IPFILTER.LICENCE file for details on licencing. 7 * 8 */ 9#if !defined(lint) 10static const char sccsid[] = "@(#)lsock.c 1.2 1/11/96 (C)1995 Darren Reed"; |
11static const char rcsid[] = "@(#)$Id: lsock.c,v 2.3 2001/06/09 17:09:26 darrenr Exp $"; | 11static const char rcsid[] = "@(#)$Id: lsock.c,v 2.3.4.1 2006/03/17 13:45:34 darrenr Exp $"; |
12#endif 13#include <stdio.h> 14#include <unistd.h> 15#include <string.h> 16#include <stdlib.h> 17#include <stddef.h> 18#include <pwd.h> 19#include <sys/types.h> --- 202 unchanged lines hidden (view full) --- 222 perror("bind"); 223 return -1; 224 } 225 len = sizeof(lsin); 226 (void) getsockname(fd, (struct sockaddr *)&lsin, &len); 227 ti->ti_sport = lsin.sin_port; 228 printf("sport %d\n", ntohs(lsin.sin_port)); 229 nfd = initdevice(dev, 0); | 12#endif 13#include <stdio.h> 14#include <unistd.h> 15#include <string.h> 16#include <stdlib.h> 17#include <stddef.h> 18#include <pwd.h> 19#include <sys/types.h> --- 202 unchanged lines hidden (view full) --- 222 perror("bind"); 223 return -1; 224 } 225 len = sizeof(lsin); 226 (void) getsockname(fd, (struct sockaddr *)&lsin, &len); 227 ti->ti_sport = lsin.sin_port; 228 printf("sport %d\n", ntohs(lsin.sin_port)); 229 nfd = initdevice(dev, 0); |
230 if (nfd == -1) 231 return -1; |
|
230 231 if (!(s = find_tcp(fd, ti))) 232 return -1; 233 234 bzero((char *)&rsin, sizeof(rsin)); 235 rsin.sin_family = AF_INET; 236 bcopy((char *)&ti->ti_dst, (char *)&rsin.sin_addr, 237 sizeof(struct in_addr)); --- 20 unchanged lines hidden --- | 232 233 if (!(s = find_tcp(fd, ti))) 234 return -1; 235 236 bzero((char *)&rsin, sizeof(rsin)); 237 rsin.sin_family = AF_INET; 238 bcopy((char *)&ti->ti_dst, (char *)&rsin.sin_addr, 239 sizeof(struct in_addr)); --- 20 unchanged lines hidden --- |