XenevaOS
Loading...
Searching...
No Matches
ndp.h
Go to the documentation of this file.
1
30#ifndef __NDP_H__
31#define __NDP_H__
32
33#include <stdint.h>
34#include <Fs/vfs.h>
35#include <Net/ipv6.h>
36
37#define NDP_OPT_SOURCE_LINK 1
38#define NDP_OPT_TARGET_LINK 2
39
40#if defined(ARCH_X64) || defined(ARCH_ARM64)
41#pragma pack(push,1)
42#endif
51
60
61typedef struct _nd_opt_link_ {
63 uint8_t length; /* units of 8 octets */
66#if defined(ARCH_X64) || defined(ARCH_ARM64)
67#pragma pack(pop)
68#endif
69
76
77extern void NDProtocolInitialise();
78extern void NDProtocolAdd(AuVFSNode* nic, const ip6_addr* address, uint8_t* hwaddr);
79extern AuNDCache* AuNDGet(const ip6_addr* address);
80extern void AuNDRequestMAC(AuVFSNode* nic, const ip6_addr* addr);
83
84#endif
unsigned int uint32_t
Definition acefiex.h:163
unsigned char uint8_t
Definition acefiex.h:161
unsigned short int uint16_t
Definition acefiex.h:162
AuVFSNode * nic
Definition e1000.cpp:67
void NDProtocolInitialise()
Definition ndp.c:45
AuNDCache * AuNDGet(const ip6_addr *address)
Definition ndp.c:67
struct _nd_neighbor_solicit_ NDNeighborSolicit
void NDHandleNeighborSolicit(IPv6Header *ipv6, AuVFSNode *nic)
Definition ndp.c:131
void NDProtocolAdd(AuVFSNode *nic, const ip6_addr *address, uint8_t *hwaddr)
Definition ndp.c:49
struct _nd_cache_ AuNDCache
void AuNDRequestMAC(AuVFSNode *nic, const ip6_addr *addr)
Definition ndp.c:80
void NDHandleNeighborAdvert(IPv6Header *ipv6, AuVFSNode *nic)
Definition ndp.c:196
struct _nd_opt_link_ NDOptLinkLayer
struct _nd_neighbor_advert_ NDNeighborAdvert
Definition vfs.h:98
Definition ipv6.h:45
Definition ipv6.h:49
Definition ndp.h:70
uint16_t flags
Definition ndp.h:72
AuVFSNode * nic
Definition ndp.h:74
ip6_addr ipAddress
Definition ndp.h:73
uint8_t hw_address[6]
Definition ndp.h:71
Definition ndp.h:52
uint32_t flags
Definition ndp.h:56
uint8_t code
Definition ndp.h:54
uint16_t checksum
Definition ndp.h:55
uint8_t options[]
Definition ndp.h:58
ip6_addr target
Definition ndp.h:57
uint8_t type
Definition ndp.h:53
Definition ndp.h:43
uint8_t type
Definition ndp.h:44
uint8_t options[]
Definition ndp.h:49
ip6_addr target
Definition ndp.h:48
uint16_t checksum
Definition ndp.h:46
uint32_t reserved
Definition ndp.h:47
uint8_t code
Definition ndp.h:45