Address Resolution Protocol.
Definition in file arp.h.
int arp_tx_request |
( |
struct net_device * |
netdev, |
|
|
struct net_protocol * |
net_protocol, |
|
|
const void * |
net_dest, |
|
|
const void * |
net_source |
|
) |
| |
Transmit ARP request.
- Parameters
-
netdev | Network device |
net_protocol | Network-layer protocol |
net_dest | Destination network-layer address |
net_source | Source network-layer address |
- Return values
-
Definition at line 59 of file arp.c.
93 DBGC (
netdev,
"ARP %s %s %s could not transmit request: %s\n",
struct arbelprm_rc_send_wqe rc
const char * name
Protocol name.
#define iob_put(iobuf, len)
uint8_t ll_addr_len
Link-layer address length.
const uint8_t * ll_broadcast
Link-layer broadcast address.
uint8_t ar_hln
Link-layer address length.
struct io_buffer * alloc_iob(size_t len)
Allocate I/O buffer.
uint16_t ar_hrd
Link-layer protocol.
#define ENOMEM
Not enough space.
void * memcpy(void *dest, const void *src, size_t len) __nonnull
#define MAX_LL_ADDR_LEN
Maximum length of a link-layer address.
#define ARPOP_REQUEST
ARP request.
const char *(* ntoa)(const void *net_addr)
Transcribe network-layer address.
static struct net_device * netdev
#define MAX_LL_HEADER_LEN
Maximum length of a link-layer header.
char * strerror(int errno)
Retrieve string representation of error number.
uint16_t ar_op
ARP opcode.
uint16_t net_proto
Network-layer protocol.
uint16_t ll_proto
Link-layer protocol.
A network-layer protocol.
#define iob_reserve(iobuf, len)
char name[NETDEV_NAME_LEN]
Name of this network device.
int net_tx(struct io_buffer *iobuf, struct net_device *netdev, struct net_protocol *net_protocol, const void *ll_dest, const void *ll_source)
Transmit network-layer packet.
uint8_t net_addr_len
Network-layer address length.
uint16_t ar_pro
Network-layer protocol.
uint8_t ar_pln
Network-layer address length.
uint8_t ll_addr[MAX_LL_ADDR_LEN]
Link-layer address.
#define MAX_NET_ADDR_LEN
Maximum length of a network-layer address.
struct ll_protocol * ll_protocol
Link-layer protocol.
void * memset(void *dest, int character, size_t len) __nonnull
References alloc_iob(), arphdr::ar_hln, arphdr::ar_hrd, arphdr::ar_op, arphdr::ar_pln, arphdr::ar_pro, ARPOP_REQUEST, DBGC, ENOMEM, htons, iob_put, iob_reserve, net_device::ll_addr, ll_protocol::ll_addr_len, net_device::ll_broadcast, ll_protocol::ll_proto, net_device::ll_protocol, MAX_LL_ADDR_LEN, MAX_LL_HEADER_LEN, MAX_NET_ADDR_LEN, memcpy(), memset(), net_protocol::name, net_device::name, net_protocol::net_addr_len, net_protocol::net_proto, net_tx(), netdev, net_protocol::ntoa, rc, and strerror().
Referenced by ipoib_transmit(), and ipv4_gratuitous_arp().