Deleted Added
full compact
alias_local.h (145927) alias_local.h (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

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

18 * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
19 * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
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 *
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

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

18 * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
19 * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
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 * $FreeBSD: head/sys/netinet/libalias/alias_local.h 145927 2005-05-05 21:05:38Z glebius $
26 * $FreeBSD: head/sys/netinet/libalias/alias_local.h 147623 2005-06-27 07:36:02Z glebius $
27 */
28
29/*
30 * Alias_local.h contains the function prototypes for alias.c,
31 * alias_db.c, alias_util.c and alias_ftp.c, alias_irc.c (as well
32 * as any future add-ons). It also includes macros, globals and
33 * struct definitions shared by more than one alias*.c file.
34 *

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

173 acc += acc >> 16; \
174 cksum = (u_short) acc; \
175 } \
176 } while (0)
177
178
179/* Prototypes */
180
27 */
28
29/*
30 * Alias_local.h contains the function prototypes for alias.c,
31 * alias_db.c, alias_util.c and alias_ftp.c, alias_irc.c (as well
32 * as any future add-ons). It also includes macros, globals and
33 * struct definitions shared by more than one alias*.c file.
34 *

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

173 acc += acc >> 16; \
174 cksum = (u_short) acc; \
175 } \
176 } while (0)
177
178
179/* Prototypes */
180
181/* General utilities */
181/*
182 * We do not calculate TCP checksums when libalias is a kernel
183 * module, since it has no idea about checksum offloading.
184 * If TCP data has changed, then we just set checksum to zero,
185 * and caller must recalculate it himself.
186 * In case if libalias will edit UDP data, the same approach
187 * should be used.
188 */
189#ifndef _KERNEL
182u_short IpChecksum(struct ip *_pip);
183u_short TcpChecksum(struct ip *_pip);
190u_short IpChecksum(struct ip *_pip);
191u_short TcpChecksum(struct ip *_pip);
192#endif
184void
185DifferentialChecksum(u_short * _cksum, void * _new, void * _old, int _n);
186
187/* Internal data access */
188struct alias_link *
189FindIcmpIn(struct libalias *la, struct in_addr _dst_addr, struct in_addr _alias_addr,
190 u_short _id_alias, int _create);
191struct alias_link *

--- 178 unchanged lines hidden ---
193void
194DifferentialChecksum(u_short * _cksum, void * _new, void * _old, int _n);
195
196/* Internal data access */
197struct alias_link *
198FindIcmpIn(struct libalias *la, struct in_addr _dst_addr, struct in_addr _alias_addr,
199 u_short _id_alias, int _create);
200struct alias_link *

--- 178 unchanged lines hidden ---