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 ) |
|
extern |
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 60 of file arp.c.
62 {
67
68
71 if ( ! iobuf )
74
75
90
91
94 DBGC (
netdev,
"ARP %s %s %s could not transmit request: %s\n",
98 }
99
100 return 0;
101}
struct arbelprm_rc_send_wqe rc
#define ENOMEM
Not enough space.
#define ARPOP_REQUEST
ARP request.
void * memcpy(void *dest, const void *src, size_t len) __nonnull
void * memset(void *dest, int character, size_t len) __nonnull
struct io_buffer * alloc_iob(size_t len)
Allocate I/O buffer.
#define iob_put(iobuf, len)
#define iob_reserve(iobuf, len)
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.
#define MAX_LL_HEADER_LEN
Maximum length of a link-layer header.
#define MAX_NET_ADDR_LEN
Maximum length of a network-layer address.
#define MAX_LL_ADDR_LEN
Maximum length of a link-layer address.
char * strerror(int errno)
Retrieve string representation of error number.
uint8_t ar_hln
Link-layer address length.
uint16_t ar_op
ARP opcode.
uint16_t ar_pro
Network-layer protocol.
uint8_t ar_pln
Network-layer address length.
uint16_t ar_hrd
Link-layer protocol.
uint8_t ll_addr_len
Link-layer address length.
uint16_t ll_proto
Link-layer protocol.
const char * name
Protocol name.
uint16_t net_proto
Network-layer protocol.
uint8_t net_addr_len
Network-layer address length.
const char *(* ntoa)(const void *net_addr)
Transcribe network-layer address.
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, ll_protocol::ll_addr_len, ll_protocol::ll_proto, MAX_LL_ADDR_LEN, MAX_LL_HEADER_LEN, MAX_NET_ADDR_LEN, memcpy(), memset(), net_protocol::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().