alias_irc.c (145932) | alias_irc.c (147623) |
---|---|
1/*- 2 * Copyright (c) 2001 Charles Mott <cm@linktel.net> 3 * All rights reserved. 4 * 5 * Redistribution and use in source and binary forms, with or without 6 * modification, are permitted provided that the following conditions 7 * are met: 8 * 1. Redistributions of source code must retain the above copyright --- 11 unchanged lines hidden (view full) --- 20 * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) 21 * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT 22 * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY 23 * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF 24 * SUCH DAMAGE. 25 */ 26 27#include <sys/cdefs.h> | 1/*- 2 * Copyright (c) 2001 Charles Mott <cm@linktel.net> 3 * All rights reserved. 4 * 5 * Redistribution and use in source and binary forms, with or without 6 * modification, are permitted provided that the following conditions 7 * are met: 8 * 1. Redistributions of source code must retain the above copyright --- 11 unchanged lines hidden (view full) --- 20 * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) 21 * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT 22 * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY 23 * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF 24 * SUCH DAMAGE. 25 */ 26 27#include <sys/cdefs.h> |
28__FBSDID("$FreeBSD: head/sys/netinet/libalias/alias_irc.c 145932 2005-05-05 21:55:17Z glebius $"); | 28__FBSDID("$FreeBSD: head/sys/netinet/libalias/alias_irc.c 147623 2005-06-27 07:36:02Z glebius $"); |
29 30/* Alias_irc.c intercepts packages contain IRC CTCP commands, and 31 changes DCC commands to export a port on the aliasing host instead 32 of an aliased host. 33 34 For this routine to work, the DCC command must fit entirely into a 35 single TCP packet. This will usually happen, but is not 36 guaranteed. --- 332 unchanged lines hidden (view full) --- 369 &new_len, 370 &pip->ip_len, 371 1); 372 pip->ip_len = new_len; 373 } 374 375 /* Compute TCP checksum for revised packet */ 376 tc->th_sum = 0; | 29 30/* Alias_irc.c intercepts packages contain IRC CTCP commands, and 31 changes DCC commands to export a port on the aliasing host instead 32 of an aliased host. 33 34 For this routine to work, the DCC command must fit entirely into a 35 single TCP packet. This will usually happen, but is not 36 guaranteed. --- 332 unchanged lines hidden (view full) --- 369 &new_len, 370 &pip->ip_len, 371 1); 372 pip->ip_len = new_len; 373 } 374 375 /* Compute TCP checksum for revised packet */ 376 tc->th_sum = 0; |
377#ifdef _KERNEL 378 tc->th_x2 = 1; 379#else |
|
377 tc->th_sum = TcpChecksum(pip); | 380 tc->th_sum = TcpChecksum(pip); |
381#endif |
|
378 return; 379 } 380} 381 382/* Notes: 383 [Note 1] 384 The initial search will most often fail; it could be replaced with a 32-bit specific search. 385 Such a search would be done for 32-bit unsigned value V: --- 14 unchanged lines hidden --- | 382 return; 383 } 384} 385 386/* Notes: 387 [Note 1] 388 The initial search will most often fail; it could be replaced with a 32-bit specific search. 389 Such a search would be done for 32-bit unsigned value V: --- 14 unchanged lines hidden --- |