|
iPXE
|
Go to the source code of this file.
Data Structures | |
| struct | in_addr |
| IP address structure. More... | |
| struct | in6_addr |
| IP6 address structure. More... | |
| struct | sockaddr_in |
| IPv4 socket address. More... | |
| struct | sockaddr_in6 |
| IPv6 socket address. More... | |
Macros | |
| #define | IP_ICMP 1 |
| #define | IP_TCP 6 |
| #define | IP_UDP 17 |
| #define | IP_ICMP6 58 |
| #define | INADDR_NONE htonl ( 0xffffffff ) |
| #define | INADDR_BROADCAST htonl ( 0xffffffff ) |
| #define | INADDR_NET_CLASSA htonl ( 0xff000000 ) |
| #define | INADDR_NET_CLASSB htonl ( 0xffff0000 ) |
| #define | INADDR_NET_CLASSC htonl ( 0xffffff00 ) |
| #define | IN_IS_CLASSA(addr) |
| #define | IN_IS_CLASSB(addr) |
| #define | IN_IS_CLASSC(addr) |
| #define | IN_IS_MULTICAST(addr) |
| #define | IN_IS_SMALL(mask) |
| #define | s6_addr in6_u.u6_addr8 |
| #define | s6_addr16 in6_u.u6_addr16 |
| #define | s6_addr32 in6_u.u6_addr32 |
| #define | IN6_IS_ADDR_UNSPECIFIED(addr) |
| #define | IN6_IS_ADDR_MULTICAST(addr) |
| #define | IN6_IS_ADDR_LINKLOCAL(addr) |
| #define | IN6_IS_ADDR_SITELOCAL(addr) |
| #define | IN6_IS_ADDR_ULA(addr) |
Typedefs | |
| typedef struct in_addr | in_addr |
Functions | |
| FILE_LICENCE (GPL2_OR_LATER_OR_UBDL) | |
| FILE_SECBOOT (PERMITTED) | |
| int | inet_aton (const char *cp, struct in_addr *inp) |
| Parse IPv4 address. | |
| char * | inet_ntoa (struct in_addr in) |
| Convert IPv4 address to dotted-quad notation. | |
| int | inet6_aton (const char *string, struct in6_addr *in) |
| Parse IPv6 address. | |
| char * | inet6_ntoa (const struct in6_addr *in) |
| Convert IPv6 address to standard notation. | |
| #define IP_UDP 17 |
Definition at line 15 of file in.h.
Referenced by gdbudp_recv(), and gdbudp_send().
| #define INADDR_NONE htonl ( 0xffffffff ) |
Definition at line 20 of file in.h.
Referenced by ipv4_add_miniroute(), and ipv4_tx().
| #define INADDR_BROADCAST htonl ( 0xffffffff ) |
Definition at line 22 of file in.h.
Referenced by dhcp_discovery_tx(), dhcp_pxebs_tx(), dhcp_request_tx(), efi_pxe_ip_filter(), ipv4_rx(), ipv4_tx(), and start_pxebs().
| #define INADDR_NET_CLASSA htonl ( 0xff000000 ) |
Definition at line 24 of file in.h.
Referenced by ipv4_add_miniroutes().
| #define INADDR_NET_CLASSB htonl ( 0xffff0000 ) |
Definition at line 25 of file in.h.
Referenced by ipv4_add_miniroutes().
| #define INADDR_NET_CLASSC htonl ( 0xffffff00 ) |
Definition at line 26 of file in.h.
Referenced by ipv4_add_miniroutes().
| #define IN_IS_CLASSA | ( | addr | ) |
Definition at line 28 of file in.h.
Referenced by ipv4_add_miniroutes(), and ipv4_test_exec().
| #define IN_IS_CLASSB | ( | addr | ) |
Definition at line 30 of file in.h.
Referenced by ipv4_add_miniroutes(), and ipv4_test_exec().
| #define IN_IS_CLASSC | ( | addr | ) |
Definition at line 32 of file in.h.
Referenced by ipv4_add_miniroutes(), and ipv4_test_exec().
| #define IN_IS_MULTICAST | ( | addr | ) |
Definition at line 34 of file in.h.
Referenced by efi_pxe_ip_filter(), ipv4_route(), ipv4_test_exec(), and ipv4_tx().
| #define IN_IS_SMALL | ( | mask | ) |
Definition at line 37 of file in.h.
Referenced by ipv4_add_miniroute().
| #define IN6_IS_ADDR_UNSPECIFIED | ( | addr | ) |
Definition at line 62 of file in.h.
Referenced by dhcpv6_fetch(), ipv6_table_okx(), ipv6_test_exec(), and ipv6_tx().
| #define IN6_IS_ADDR_MULTICAST | ( | addr | ) |
Definition at line 68 of file in.h.
Referenced by efi_pxe_ip_filter(), ipv6_route(), ipv6_scope(), ipv6_sock_aton(), ipv6_sock_ntoa(), ipv6_test_exec(), and ipv6_tx().
| #define IN6_IS_ADDR_LINKLOCAL | ( | addr | ) |
Definition at line 71 of file in.h.
Referenced by ipv6_scope(), ipv6_sock_aton(), ipv6_sock_ntoa(), and ipv6_test_exec().
| #define IN6_IS_ADDR_SITELOCAL | ( | addr | ) |
Definition at line 75 of file in.h.
Referenced by ipv6_scope(), and ipv6_test_exec().
| #define IN6_IS_ADDR_ULA | ( | addr | ) |
Definition at line 79 of file in.h.
Referenced by ipv6_scope(), and ipv6_test_exec().
| FILE_LICENCE | ( | GPL2_OR_LATER_OR_UBDL | ) |
| FILE_SECBOOT | ( | PERMITTED | ) |
|
extern |
Parse IPv4 address.
| string | IPv4 address string |
| in | IPv4 address to fill in |
| ok | IPv4 address is valid |
Note that this function returns nonzero iff the address is valid, to match the standard BSD API function of the same name. Unlike most other iPXE functions, a zero therefore indicates failure.
Definition at line 787 of file ipv4.c.
References in, strtoul(), and value.
Referenced by inet_aton_fail_okx(), inet_aton_okx(), ipv4_route_okx(), ipv4_sock_aton(), parse_ipv4_setting(), and tftp_process_multicast().
|
extern |
Convert IPv4 address to dotted-quad notation.
| in | IPv4 address |
| string | IPv4 address in dotted-quad notation |
Definition at line 814 of file ipv4.c.
References bytes, in, and sprintf.
Referenced by dhcp_deliver(), dhcp_discovery_rx(), dhcp_proxy_rx(), dhcp_proxy_tx(), dhcp_pxebs_accept(), dhcp_pxebs_rx(), dhcp_pxebs_tx(), dhcp_request_rx(), dhcp_request_tx(), efi_snp_mcast_ip_to_mac(), fetch_next_server_and_filename(), format_ipv4_setting(), gve_describe(), ibft_ipaddr(), inet_aton_okx(), inet_ntoa_okx(), ipoib_transmit(), ipv4_add_miniroute(), ipv4_del_miniroute(), ipv4_gratuitous_arp(), ipv4_ntoa(), ipv4_route_okx(), ipv4_rx(), ipv4_sock_ntoa(), ipv4_tx(), pxenv_udp_open(), pxenv_udp_read(), pxenv_udp_write(), pxenv_undi_get_mcast_address(), route_ipv4_print(), start_pxebs(), tftp_apply_settings(), and tftp_process_multicast().
|
extern |
Parse IPv6 address.
| string | IPv6 address string |
| in | IPv6 address to fill in |
| rc | Return status code |
Definition at line 825 of file ipv6.c.
References DBG, EINVAL, end, htons, in, memmove(), memset(), NULL, pad, pad_len, string, strtoul(), and value.
Referenced by inet6_aton_fail_okx(), inet6_aton_okx(), ipv6_route_okx(), ipv6_sock_aton(), ipv6_table_okx(), and parse_ipv6_setting().
|
extern |
Convert IPv6 address to standard notation.
| in | IPv6 address |
| string | IPv6 address string in canonical format |
RFC5952 defines the canonical format for IPv6 textual representation.
Definition at line 895 of file ipv6.c.
References dest, in, len, ntohs, NULL, out, sprintf, start, strcpy(), and value.
Referenced by dhcpv6_rx(), format_ipv6_setting(), inet6_aton_okx(), inet6_ntoa_okx(), ipv6_dump_miniroute(), ipv6_ntoa(), ipv6_route_okx(), ipv6_rx(), ipv6_sock_ntoa(), ipv6_tx(), ndp_prefix_fetch_ip6(), ndp_rx_neighbour_advertisement_ll_target(), ndp_rx_neighbour_solicitation_ll_source(), ndp_rx_router_advertisement_ll_source(), ndp_rx_router_advertisement_prefix(), and route_ipv6_print().