freebsd-dev/sbin/ipf/iplang/iplang.h
Cy Schubert 41edb306f0 ipfilter: Move userland bits to sbin
Through fixes and improvements our ipfilter sources have diverged
enough to warrant move from contrib into sbin/ipf. Now that I'm
planning on implementing MSS clamping as in iptables it makes more
sense to move ipfilter to sbin.

This is the second of three commits of the ipfilter move.

Suggested by glebius on two occaions.

Suggested by and discussed with:	glebius
Reviewed by:				glebius, kp (for #network)
MFC after:				1 month
Differential Revision:		https://reviews.freebsd.org/D33510
2021-12-20 06:16:33 -08:00

55 lines
931 B
C

/* $FreeBSD$ */
/*
* Copyright (C) 2012 by Darren Reed.
*
* See the IPFILTER.LICENCE file for details on licencing.
*/
typedef struct iface {
int if_MTU;
char *if_name;
struct in_addr if_addr;
struct ether_addr if_eaddr;
struct iface *if_next;
int if_fd;
} iface_t;
typedef struct send {
struct iface *snd_if;
struct in_addr snd_gw;
} send_t;
typedef struct arp {
struct in_addr arp_addr;
struct ether_addr arp_eaddr;
struct arp *arp_next;
} arp_t;
typedef struct aniphdr {
union {
ip_t *ahu_ip;
char *ahu_data;
tcphdr_t *ahu_tcp;
udphdr_t *ahu_udp;
icmphdr_t *ahu_icmp;
} ah_un;
int ah_optlen;
int ah_lastopt;
int ah_p;
size_t ah_len;
struct aniphdr *ah_next;
struct aniphdr *ah_prev;
} aniphdr_t;
#define ah_ip ah_un.ahu_ip
#define ah_data ah_un.ahu_data
#define ah_tcp ah_un.ahu_tcp
#define ah_udp ah_un.ahu_udp
#define ah_icmp ah_un.ahu_icmp
extern int get_arpipv4(char *, char *);