1 | /* $NetBSD: iplang.h,v 1.1.1.2 2012/07/22 13:44:33 darrenr Exp $ */ |
2 | |
3 | /* |
4 | * Copyright (C) 2012 by Darren Reed. |
5 | * |
6 | * See the IPFILTER.LICENCE file for details on licencing. |
7 | */ |
8 | typedef struct iface { |
9 | int if_MTU; |
10 | char *if_name; |
11 | struct in_addr if_addr; |
12 | struct ether_addr if_eaddr; |
13 | struct iface *if_next; |
14 | int if_fd; |
15 | } iface_t; |
16 | |
17 | |
18 | typedef struct send { |
19 | struct iface *snd_if; |
20 | struct in_addr snd_gw; |
21 | } send_t; |
22 | |
23 | |
24 | typedef struct arp { |
25 | struct in_addr arp_addr; |
26 | struct ether_addr arp_eaddr; |
27 | struct arp *arp_next; |
28 | } arp_t; |
29 | |
30 | |
31 | typedef struct aniphdr { |
32 | union { |
33 | ip_t *ahu_ip; |
34 | char *ahu_data; |
35 | tcphdr_t *ahu_tcp; |
36 | udphdr_t *ahu_udp; |
37 | icmphdr_t *ahu_icmp; |
38 | } ah_un; |
39 | int ah_optlen; |
40 | int ah_lastopt; |
41 | int ah_p; |
42 | size_t ah_len; |
43 | struct aniphdr *ah_next; |
44 | struct aniphdr *ah_prev; |
45 | } aniphdr_t; |
46 | |
47 | #define ah_ip ah_un.ahu_ip |
48 | #define ah_data ah_un.ahu_data |
49 | #define ah_tcp ah_un.ahu_tcp |
50 | #define ah_udp ah_un.ahu_udp |
51 | #define ah_icmp ah_un.ahu_icmp |
52 | |
53 | extern int get_arpipv4 __P((char *, char *)); |
54 | |
55 | |