|
iPXE
|
IP protocol. More...
#include <stdint.h>#include <ipxe/in.h>#include <ipxe/list.h>#include <ipxe/retry.h>#include <ipxe/netdevice.h>Go to the source code of this file.
Data Structures | |
| struct | iphdr |
| An IPv4 packet header. More... | |
| struct | ipv4_pseudo_header |
| An IPv4 pseudo header. More... | |
| struct | ipv4_miniroute |
| An IPv4 address/routing table entry. More... | |
Macros | |
| #define | IP_VER 0x40U |
| #define | IP_MASK_VER 0xf0U |
| #define | IP_MASK_HLEN 0x0fU |
| #define | IP_MASK_OFFSET 0x1fffU |
| #define | IP_MASK_DONOTFRAG 0x4000U |
| #define | IP_MASK_MOREFRAGS 0x2000U |
| #define | IP_PSHLEN 12 |
| #define | IP_TOS 0 |
| #define | IP_TTL 64 |
Functions | |
| FILE_LICENCE (GPL2_OR_LATER_OR_UBDL) | |
| struct ipv4_miniroute * | ipv4_route (unsigned int scope_id, struct in_addr *dest) |
| Perform IPv4 routing. More... | |
| int | ipv4_has_any_addr (struct net_device *netdev) |
| Check if network device has any IPv4 address. More... | |
| int | parse_ipv4_setting (const struct setting_type *type, const char *value, void *buf, size_t len) |
| int | format_ipv4_setting (const struct setting_type *type, const void *raw, size_t raw_len, char *buf, size_t len) |
Variables | |
| struct list_head | ipv4_miniroutes |
| List of IPv4 miniroutes. More... | |
| struct net_protocol ipv4_protocol | __net_protocol |
| AoE protocol. More... | |
IP protocol.
Definition in file ip.h.
| FILE_LICENCE | ( | GPL2_OR_LATER_OR_UBDL | ) |
| struct ipv4_miniroute* ipv4_route | ( | unsigned int | scope_id, |
| struct in_addr * | dest | ||
| ) |
Perform IPv4 routing.
| scope_id | Destination address scope ID |
| dest | Final destination address |
| dest | Next hop destination address |
| miniroute | Routing table entry to use, or NULL if no route |
If the route requires use of a gateway, the next hop destination address will be overwritten with the gateway address.
Definition at line 309 of file ipv4.c.
References dest, ipv4_miniroute::gateway, IN_IS_MULTICAST, ipv4_miniroutes, ipv4_miniroute::list, list_for_each_entry, ipv4_miniroute::netdev, netdev_is_open(), ipv4_miniroute::netmask, ipv4_miniroute::network, NULL, in_addr::s_addr, and net_device::scope_id.
Referenced by ipv4_netdev(), ipv4_route_okx(), and ipv4_tx().
| int ipv4_has_any_addr | ( | struct net_device * | netdev | ) |
Check if network device has any IPv4 address.
| netdev | Network device |
| has_any_addr | Network device has any IPv4 address |
Definition at line 588 of file ipv4.c.
References ipv4_miniroutes, ipv4_miniroute::list, list_for_each_entry, netdev, and ipv4_miniroute::netdev.
Referenced by dhcp_create_packet(), and ipv4_rx().
| int parse_ipv4_setting | ( | const struct setting_type * | type, |
| const char * | value, | ||
| void * | buf, | ||
| size_t | len | ||
| ) |
| int format_ipv4_setting | ( | const struct setting_type * | type, |
| const void * | raw, | ||
| size_t | raw_len, | ||
| char * | buf, | ||
| size_t | len | ||
| ) |
| struct list_head ipv4_miniroutes |
List of IPv4 miniroutes.
Definition at line 57 of file ipv4.c.
Referenced by ipv4_add_miniroute(), ipv4_del_miniroutes(), ipv4_has_addr(), ipv4_has_any_addr(), ipv4_route(), and route_ipv4_print().
| struct net_protocol ipv4_protocol __net_protocol |
1.8.15