alias_nbt.c (99207) | alias_nbt.c (108533) |
---|---|
1/*- 2 * Written by Atsushi Murai <amurai@spec.co.jp> 3 * Copyright (c) 1998, System Planning and Engineering Co. 4 * All rights reserved. 5 * 6 * Redistribution and use in source and binary forms, with or without 7 * modification, are permitted provided that the following conditions 8 * are met: --- 15 unchanged lines hidden (view full) --- 24 * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF 25 * SUCH DAMAGE. 26 * TODO: 27 * oClean up. 28 * oConsidering for word alignment for other platform. 29 */ 30 31#include <sys/cdefs.h> | 1/*- 2 * Written by Atsushi Murai <amurai@spec.co.jp> 3 * Copyright (c) 1998, System Planning and Engineering Co. 4 * All rights reserved. 5 * 6 * Redistribution and use in source and binary forms, with or without 7 * modification, are permitted provided that the following conditions 8 * are met: --- 15 unchanged lines hidden (view full) --- 24 * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF 25 * SUCH DAMAGE. 26 * TODO: 27 * oClean up. 28 * oConsidering for word alignment for other platform. 29 */ 30 31#include <sys/cdefs.h> |
32__FBSDID("$FreeBSD: head/sys/netinet/libalias/alias_nbt.c 99207 2002-07-01 11:19:40Z brian $"); | 32__FBSDID("$FreeBSD: head/sys/netinet/libalias/alias_nbt.c 108533 2003-01-01 18:49:04Z schweikh $"); |
33 34/* 35 alias_nbt.c performs special processing for NetBios over TCP/IP 36 sessions by UDP. 37 38 Initial version: May, 1998 (Atsushi Murai <amurai@spec.co.jp>) 39 40 See HISTORY file for record of revisions. --- 193 unchanged lines hidden (view full) --- 234 p = AliasHandleName ( p, pmax ); /* Destination Name */ 235 break; 236 } 237 if (p == NULL || (char *)p > pmax) 238 p = NULL; 239#ifdef DEBUG 240 printf("%s:%d-->", inet_ntoa(ndh->source_ip), ntohs(ndh->source_port) ); 241#endif | 33 34/* 35 alias_nbt.c performs special processing for NetBios over TCP/IP 36 sessions by UDP. 37 38 Initial version: May, 1998 (Atsushi Murai <amurai@spec.co.jp>) 39 40 See HISTORY file for record of revisions. --- 193 unchanged lines hidden (view full) --- 234 p = AliasHandleName ( p, pmax ); /* Destination Name */ 235 break; 236 } 237 if (p == NULL || (char *)p > pmax) 238 p = NULL; 239#ifdef DEBUG 240 printf("%s:%d-->", inet_ntoa(ndh->source_ip), ntohs(ndh->source_port) ); 241#endif |
242 /* Doing a IP address and Port number Translation */ | 242 /* Doing an IP address and Port number Translation */ |
243 if ( uh->uh_sum != 0 ) { 244 int acc; 245 u_short *sptr; 246 acc = ndh->source_port; 247 acc -= alias_port; 248 sptr = (u_short *) &(ndh->source_ip); 249 acc += *sptr++; 250 acc += *sptr; --- 454 unchanged lines hidden --- | 243 if ( uh->uh_sum != 0 ) { 244 int acc; 245 u_short *sptr; 246 acc = ndh->source_port; 247 acc -= alias_port; 248 sptr = (u_short *) &(ndh->source_ip); 249 acc += *sptr++; 250 acc += *sptr; --- 454 unchanged lines hidden --- |