KallistiOS git master
Independent SDK for the Sega Dreamcast
|
API for the Neighbor Discovery Protocol More...
Functions | |
int | net_ndp_init (void) |
Init NDP. | |
void | net_ndp_shutdown (void) |
Shutdown NDP. | |
void | net_ndp_gc (void) |
Garbage collect timed out NDP entries. | |
int | net_ndp_insert (netif_t *nif, const uint8 mac[6], const struct in6_addr *ip, int unsol) |
Add an entry to the NDP cache. | |
int | net_ndp_lookup (netif_t *net, const struct in6_addr *ip, uint8 mac_out[6], const ipv6_hdr_t *pkt, const uint8 *data, int data_size) |
Look up an entry from the NDP cache. | |
API for the Neighbor Discovery Protocol
void net_ndp_gc | ( | void | ) |
Garbage collect timed out NDP entries.
This will be called periodically as NDP queries come in.
int net_ndp_init | ( | void | ) |
Init NDP.
0 | On success (no error conditions defined). |
Add an entry to the NDP cache.
nif | The network device in question. |
mac | The MAC address for the entry. |
ip | The IPv6 address for the entry. |
unsol | Was this unsolicited? |
int net_ndp_lookup | ( | netif_t * | net, |
const struct in6_addr * | ip, | ||
uint8 | mac_out[6], | ||
const ipv6_hdr_t * | pkt, | ||
const uint8 * | data, | ||
int | data_size ) |
Look up an entry from the NDP cache.
If no entry is found, then an NDP query will be sent and an error will be returned. If you specify a packet with the call, it will be sent when the reply comes in.
net | The network device to use. |
ip | The IPv6 address to query. |
mac_out | Storage for the MAC address on success. |
pkt | A simple IPv6 header, if you want to send a packet when a reply comes in. |
data | Anything that comes after the header. |
data_size | The size of data. |
void net_ndp_shutdown | ( | void | ) |
Shutdown NDP.