Deleted Added
full compact
alias_proxy.c (145963) alias_proxy.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_proxy.c 145963 2005-05-06 13:01:31Z glebius $");
28__FBSDID("$FreeBSD: head/sys/netinet/libalias/alias_proxy.c 147623 2005-06-27 07:36:02Z glebius $");
29
30/* file: alias_proxy.c
31
32 This file encapsulates special operations related to transparent
33 proxy redirection. This is where packets with a particular destination,
34 usually tcp port 80, are redirected to a proxy server.
35
36 When packets are proxied, the destination address and port are

--- 432 unchanged lines hidden (view full) ---

469
470 ADJUST_CHECKSUM(accumulate, pip->ip_sum);
471 }
472
473/* Update TCP checksum, Use TcpChecksum since so many things have
474 already changed. */
475
476 tc->th_sum = 0;
29
30/* file: alias_proxy.c
31
32 This file encapsulates special operations related to transparent
33 proxy redirection. This is where packets with a particular destination,
34 usually tcp port 80, are redirected to a proxy server.
35
36 When packets are proxied, the destination address and port are

--- 432 unchanged lines hidden (view full) ---

469
470 ADJUST_CHECKSUM(accumulate, pip->ip_sum);
471 }
472
473/* Update TCP checksum, Use TcpChecksum since so many things have
474 already changed. */
475
476 tc->th_sum = 0;
477#ifdef _KERNEL
478 tc->th_x2 = 1;
479#else
477 tc->th_sum = TcpChecksum(pip);
480 tc->th_sum = TcpChecksum(pip);
481#endif
478}
479
480static void
481ProxyEncodeIpHeader(struct ip *pip,
482 int maxpacketsize)
483{
484#define OPTION_LEN_BYTES 8
485#define OPTION_LEN_INT16 4

--- 446 unchanged lines hidden ---
482}
483
484static void
485ProxyEncodeIpHeader(struct ip *pip,
486 int maxpacketsize)
487{
488#define OPTION_LEN_BYTES 8
489#define OPTION_LEN_INT16 4

--- 446 unchanged lines hidden ---