3 * Copyright (C) 2008 Tomas 'ZeXx86' Jedrzejek (zexx86@zexos.org)
5 * This program is free software: you can redistribute it and/or modify
6 * it under the terms of the GNU General Public License as published by
7 * the Free Software Foundation, either version 3 of the License, or
8 * (at your option) any later version.
10 * This program is distributed in the hope that it will be useful,
11 * but WITHOUT ANY WARRANTY; without even the implied warranty of
12 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
13 * GNU General Public License for more details.
15 * You should have received a copy of the GNU General Public License
16 * along with this program. If not, see <http://www.gnu.org/licenses/>.
22 #define MIN_ARP_SIZE 28
24 #define __PACKED__ __attribute__ ((__packed__))
26 typedef struct arp_cache_context
{
27 struct arp_cache_context
*next
, *prev
;
33 typedef struct proto_arp_t
{
34 unsigned short hard_type
;
35 unsigned short prot_type
;
36 unsigned char hard_size
;
37 unsigned char prot_size
;
39 mac_addr_t sender_ethernet
;
41 mac_addr_t target_ethernet
;
43 } __PACKED__ proto_arp_t
;
46 ARP_OP_REQUEST
= 0x100,
53 ARP_HARD_TYPE_ETHERNET
= 0x100
56 extern unsigned arp_cache_add (mac_addr_t mac
, net_ipv4 ip
);
57 extern unsigned arp_cache_get (net_ipv4 ip
, mac_addr_t
*mac
);
58 extern unsigned init_proto_arp ();