|
UbixOS
2.0
|
#include <sys/types.h>#include <lib/kprintf.h>#include "net/debug.h"#include "net/ipv4/inet.h"#include "netif/arp.h"#include "net/ipv4/ip.h"
Go to the source code of this file.
Data Structures | |
| struct | arp_entry |
| struct | arp_hdr |
| struct | ethip_hdr |
Macros | |
| #define | ARP_MAXAGE 2 /* 120 * 10 seconds = 20 minutes. */ |
| #define | ARP_REPLY 2 |
| #define | ARP_REQUEST 1 |
| #define | ARPH_HWLEN(hdr) (NTOHS((hdr)->_hwlen_protolen) >> 8) |
| #define | ARPH_HWLEN_SET(hdr, len) (hdr)->_hwlen_protolen = HTONS(ARPH_PROTOLEN(hdr) | ((len) << 8)) |
| #define | ARPH_PROTOLEN(hdr) (NTOHS((hdr)->_hwlen_protolen) & 0xff) |
| #define | ARPH_PROTOLEN_SET(hdr, len) (hdr)->_hwlen_protolen = HTONS((len) | (ARPH_HWLEN(hdr) << 8)) |
| #define | HWTYPE_ETHERNET 1 |
Functions | |
| struct pbuf * | arp_arp_input (struct netif *netif, struct eth_addr *ethaddr, struct pbuf *p) |
| void | arp_init (void) |
| void | arp_ip_input (struct netif *netif, struct pbuf *p) |
| struct eth_addr * | arp_lookup (struct ip_addr *ipaddr) |
| struct pbuf * | arp_query (struct netif *netif, struct eth_addr *ethaddr, struct ip_addr *ipaddr) |
| void | arp_tmr (void) |
Variables | |
| PACK_STRUCT_BEGIN struct arp_hdr | PACK_STRUCT_STRUCT |
| #define ARPH_HWLEN_SET | ( | hdr, | |
| len | |||
| ) | (hdr)->_hwlen_protolen = HTONS(ARPH_PROTOLEN(hdr) | ((len) << 8)) |
| #define ARPH_PROTOLEN | ( | hdr | ) | (NTOHS((hdr)->_hwlen_protolen) & 0xff) |
| #define ARPH_PROTOLEN_SET | ( | hdr, | |
| len | |||
| ) | (hdr)->_hwlen_protolen = HTONS((len) | (ARPH_HWLEN(hdr) << 8)) |
Definition at line 197 of file arp.c.
References ARP_REPLY, ARP_REQUEST, ARPH_HWLEN_SET, ARPH_PROTOLEN_SET, ETHTYPE_ARP, ETHTYPE_IP, htons, HWTYPE_ETHERNET, ip_addr_cmp, ip_addr_set, kprintf(), NULL, pbuf::payload, pbuf_free(), and pbuf::tot_len.

| void arp_init | ( | void | ) |
Definition at line 93 of file arp.c.
References ARP_TABLE_SIZE, and ip_addr_set.
Definition at line 181 of file arp.c.
References pbuf::payload.
| struct eth_addr* arp_lookup | ( | struct ip_addr * | ipaddr | ) |
Definition at line 260 of file arp.c.
References ARP_TABLE_SIZE, and ip_addr_cmp.
Definition at line 273 of file arp.c.
References ARP_REQUEST, ARPH_HWLEN_SET, ARPH_PROTOLEN_SET, ETHTYPE_ARP, ETHTYPE_IP, htons, HWTYPE_ETHERNET, ip_addr_set, NULL, pbuf::payload, pbuf_alloc(), PBUF_LINK, and PBUF_RAM.

| PACK_STRUCT_BEGIN struct arp_hdr PACK_STRUCT_STRUCT |