#include <stdint.h>
#include <gpxe/in.h>
Go to the source code of this file.
Data Structures | |
| struct | ip6_header |
| struct | ipv6_pseudo_header |
Defines | |
| #define | IP6_VERSION 0x6 |
| #define | IP6_HOP_LIMIT 255 |
| #define | MAX_HDR_LEN 100 |
| I/O buffer contents This is duplicated in tcp.h and here. | |
| #define | MAX_IOB_LEN 1500 |
| #define | MIN_IOB_LEN MAX_HDR_LEN + 100 |
| #define | IP6_EQUAL(in6_addr1, in6_addr2) |
| #define | IS_UNSPECIFIED(addr) |
| #define | IP6_HOPBYHOP 0x00 |
| #define | IP6_ROUTING 0x43 |
| #define | IP6_FRAGMENT 0x44 |
| #define | IP6_AUTHENTICATION 0x51 |
| #define | IP6_DEST_OPTS 0x60 |
| #define | IP6_ESP 0x50 |
| #define | IP6_ICMP6 0x58 |
| #define | IP6_NO_HEADER 0x59 |
Functions | |
| FILE_LICENCE (GPL2_OR_LATER) | |
| char * | inet6_ntoa (struct in6_addr in6) |
| Print a IP6 address as xxxx:xxxx:xxxx:xxxx:xxxx:xxxx:xxxx:xxxx. | |
| int | add_ipv6_address (struct net_device *netdev, struct in6_addr prefix, int prefix_len, struct in6_addr address, struct in6_addr gateway) |
| Add IPv6 interface. | |
| void | del_ipv6_address (struct net_device *netdev) |
| Remove IPv6 interface. | |
Variables | |
| struct net_protocol | ipv6_protocol |
| struct tcpip_net_protocol | ipv6_tcpip_protocol |
Definition in file ip6.h.
| #define MAX_HDR_LEN 100 |
I/O buffer contents This is duplicated in tcp.h and here.
Ideally it should go into iobuf.h
Definition at line 24 of file ip6.h.
Referenced by icmp6_send_solicit(), tcp_xmit(), and tcp_xmit_reset().
| #define MIN_IOB_LEN MAX_HDR_LEN + 100 |
| #define IP6_EQUAL | ( | in6_addr1, | |||
| in6_addr2 | ) |
Value:
Definition at line 28 of file ip6.h.
Referenced by add_ipv6_miniroute(), ipv6_tx(), ndp_find_entry(), and ndp_process_advert().
| #define IS_UNSPECIFIED | ( | addr | ) |
| #define IP6_HOPBYHOP 0x00 |
| #define IP6_ROUTING 0x43 |
| #define IP6_FRAGMENT 0x44 |
| #define IP6_AUTHENTICATION 0x51 |
| #define IP6_DEST_OPTS 0x60 |
| #define IP6_ESP 0x50 |
| #define IP6_ICMP6 0x58 |
| #define IP6_NO_HEADER 0x59 |
| FILE_LICENCE | ( | GPL2_OR_LATER | ) |
| char* inet6_ntoa | ( | struct in6_addr | in6 | ) |
Print a IP6 address as xxxx:xxxx:xxxx:xxxx:xxxx:xxxx:xxxx:xxxx.
Definition at line 355 of file ipv6.c.
References sprintf.
Referenced by add_ndp_entry(), ipv6_dump(), ipv6_ntoa(), ipv6_tx(), and ndp_resolve().
00355 { 00356 static char buf[40]; 00357 uint16_t *bytes = ( uint16_t* ) &in6; 00358 sprintf ( buf, "%x:%x:%x:%x:%x:%x:%x:%x", bytes[0], bytes[1], bytes[2], 00359 bytes[3], bytes[4], bytes[5], bytes[6], bytes[7] ); 00360 return buf; 00361 }
| int add_ipv6_address | ( | struct net_device * | netdev, | |
| struct in6_addr | prefix, | |||
| int | prefix_len, | |||
| struct in6_addr | address, | |||
| struct in6_addr | gateway | |||
| ) |
Add IPv6 interface.
| netdev | Network device | |
| prefix | Destination prefix | |
| address | Address of the interface | |
| gateway | Gateway address (or ::0 for no gateway) |
Definition at line 100 of file ipv6.c.
References add_ipv6_miniroute(), del_ipv6_address(), and ENOMEM.
00102 { 00103 struct ipv6_miniroute *miniroute; 00104 00105 /* Clear any existing address for this net device */ 00106 del_ipv6_address ( netdev ); 00107 00108 /* Add new miniroute */ 00109 miniroute = add_ipv6_miniroute ( netdev, prefix, prefix_len, address, 00110 gateway ); 00111 if ( ! miniroute ) 00112 return -ENOMEM; 00113 00114 return 0; 00115 }
| void del_ipv6_address | ( | struct net_device * | netdev | ) |
Remove IPv6 interface.
| netdev | Network device |
Definition at line 122 of file ipv6.c.
References del_ipv6_miniroute(), ipv6_miniroute::list, list_for_each_entry, and ipv6_miniroute::netdev.
Referenced by add_ipv6_address().
00122 { 00123 struct ipv6_miniroute *miniroute; 00124 00125 list_for_each_entry ( miniroute, &miniroutes, list ) { 00126 if ( miniroute->netdev == netdev ) { 00127 del_ipv6_miniroute ( miniroute ); 00128 break; 00129 } 00130 } 00131 }
| struct net_protocol ipv6_protocol |
1.5.7.1