2 * Copyright (C) 2007 Michael Brown <mbrown@fensystems.co.uk>.
4 * This program is free software; you can redistribute it and/or
5 * modify it under the terms of the GNU General Public License as
6 * published by the Free Software Foundation; either version 2 of the
7 * License, or any later version.
9 * This program is distributed in the hope that it will be useful, but
10 * WITHOUT ANY WARRANTY; without even the implied warranty of
11 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
12 * General Public License for more details.
14 * You should have received a copy of the GNU General Public License
15 * along with this program; if not, write to the Free Software
16 * Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
19 FILE_LICENCE ( GPL2_OR_LATER
);
23 #include <gpxe/netdevice.h>
24 #include <gpxe/iobuf.h>
25 #include <gpxe/if_ether.h>
26 #include <gpxe/rarp.h>
30 * Reverse Address Resolution Protocol
35 * Process incoming ARP packets
38 * @v netdev Network device
39 * @v ll_source Link-layer source address
40 * @ret rc Return status code
42 * This is a dummy method which simply discards RARP packets.
44 static int rarp_rx ( struct io_buffer
*iobuf
,
45 struct net_device
*netdev __unused
,
46 const void *ll_source __unused
) {
53 * Transcribe RARP address
55 * @v net_addr RARP address
56 * @ret string "<RARP>"
58 * This operation is meaningless for the RARP protocol.
60 static const char * rarp_ntoa ( const void *net_addr __unused
) {
65 struct net_protocol rarp_protocol __net_protocol
= {
67 .net_proto
= htons ( ETH_P_RARP
),