alias_smedia.c (164075) | alias_smedia.c (176884) |
---|---|
1/* 2 * alias_smedia.c 3 * 4 * Copyright (c) 2000 Whistle Communications, Inc. 5 * All rights reserved. 6 * 7 * Subject to the following obligations and disclaimer of warranty, use and 8 * redistribution of this software, in source or object code forms, with or --- 50 unchanged lines hidden (view full) --- 59 * SUCH DAMAGE. 60 * 61 * Authors: Erik Salander <erik@whistle.com> 62 * Junichi SATOH <junichi@astec.co.jp> 63 * <junichi@junichi.org> 64 */ 65 66#include <sys/cdefs.h> | 1/* 2 * alias_smedia.c 3 * 4 * Copyright (c) 2000 Whistle Communications, Inc. 5 * All rights reserved. 6 * 7 * Subject to the following obligations and disclaimer of warranty, use and 8 * redistribution of this software, in source or object code forms, with or --- 50 unchanged lines hidden (view full) --- 59 * SUCH DAMAGE. 60 * 61 * Authors: Erik Salander <erik@whistle.com> 62 * Junichi SATOH <junichi@astec.co.jp> 63 * <junichi@junichi.org> 64 */ 65 66#include <sys/cdefs.h> |
67__FBSDID("$FreeBSD: head/sys/netinet/libalias/alias_smedia.c 164075 2006-11-07 21:06:48Z marcus $"); | 67__FBSDID("$FreeBSD: head/sys/netinet/libalias/alias_smedia.c 176884 2008-03-06 21:50:41Z piso $"); |
68 69/* 70 Alias_smedia.c is meant to contain the aliasing code for streaming media 71 protocols. It performs special processing for RSTP sessions under TCP. 72 Specifically, when a SETUP request is sent by a client, or a 200 reply 73 is sent by a server, it is intercepted and modified. The address is 74 changed to the gateway machine and an aliasing port is used. 75 --- 323 unchanged lines hidden (view full) --- 399 port_newdata += port_dlen; 400 *port_newdata = '\0'; 401 402 /* Create new packet */ 403 new_dlen = port_newdata - newdata; 404 memcpy(data, newdata, new_dlen); 405 406 SetAckModified(lnk); | 68 69/* 70 Alias_smedia.c is meant to contain the aliasing code for streaming media 71 protocols. It performs special processing for RSTP sessions under TCP. 72 Specifically, when a SETUP request is sent by a client, or a 200 reply 73 is sent by a server, it is intercepted and modified. The address is 74 changed to the gateway machine and an aliasing port is used. 75 --- 323 unchanged lines hidden (view full) --- 399 port_newdata += port_dlen; 400 *port_newdata = '\0'; 401 402 /* Create new packet */ 403 new_dlen = port_newdata - newdata; 404 memcpy(data, newdata, new_dlen); 405 406 SetAckModified(lnk); |
407 delta = GetDeltaSeqOut(pip, lnk); 408 AddSeq(pip, lnk, delta + new_dlen - dlen); | 407 tc = (struct tcphdr *)ip_next(pip); 408 delta = GetDeltaSeqOut(tc->th_seq, lnk); 409 AddSeq(lnk, delta + new_dlen - dlen, pip->ip_hl, pip->ip_len, 410 tc->th_seq, tc->th_off); |
409 410 new_len = htons(hlen + new_dlen); 411 DifferentialChecksum(&pip->ip_sum, 412 &new_len, 413 &pip->ip_len, 414 1); 415 pip->ip_len = new_len; 416 --- 131 unchanged lines hidden --- | 411 412 new_len = htons(hlen + new_dlen); 413 DifferentialChecksum(&pip->ip_sum, 414 &new_len, 415 &pip->ip_len, 416 1); 417 pip->ip_len = new_len; 418 --- 131 unchanged lines hidden --- |