|
#define | Ipv4Header struct _Ipv4Header |
|
#define | Ipv4PseudoHeader struct _Ipv4PseudoHeader |
|
#define | IPV4_SUPPORT ENABLED |
|
#define | IPV4_IPSEC_SUPPORT DISABLED |
|
#define | IPV4_DEFAULT_TTL 64 |
|
#define | IPV4_ADDR_LIST_SIZE 1 |
|
#define | IPV4_DNS_SERVER_LIST_SIZE 2 |
|
#define | IPV4_MULTICAST_FILTER_SIZE 4 |
|
#define | IPV4_MAX_MULTICAST_SOURCES 0 |
|
#define | IPV4_VERSION 4 |
|
#define | IPV4_MINIMUM_MTU 68 |
|
#define | IPV4_DEFAULT_MTU 576 |
|
#define | IPV4_MIN_HEADER_LENGTH 20 |
|
#define | IPV4_MAX_HEADER_LENGTH 60 |
|
#define | IPV4_DATA(packet) ((uint8_t *) packet + packet->headerLength * 4) |
|
#define | IPV4_ADDR(a, b, c, d) ((a) | ((b) << 8) | ((c) << 16) | ((uint32_t) (d) << 24)) |
|
#define | IPV4_UNSPECIFIED_ADDR IPV4_ADDR(0, 0, 0, 0) |
|
#define | IPV4_BROADCAST_ADDR IPV4_ADDR(255, 255, 255, 255) |
|
#define | IPV4_LOOPBACK_ADDR IPV4_ADDR(127, 0, 0, 1) |
|
#define | IPV4_LOOPBACK_PREFIX IPV4_ADDR(127, 0, 0, 0) |
|
#define | IPV4_LOOPBACK_MASK IPV4_ADDR(255, 0, 0, 0) |
|
#define | IPV4_LINK_LOCAL_PREFIX IPV4_ADDR(169, 254, 0, 0) |
|
#define | IPV4_LINK_LOCAL_MASK IPV4_ADDR(255, 255, 0, 0) |
|
#define | IPV4_MULTICAST_PREFIX IPV4_ADDR(224, 0, 0, 0) |
|
#define | IPV4_MULTICAST_MASK IPV4_ADDR(240, 0, 0, 0) |
|
#define | IPV4_MULTICAST_LNCB_PREFIX IPV4_ADDR(224, 0, 0, 0) |
|
#define | IPV4_MULTICAST_LNCB_MASK IPV4_ADDR(255, 255, 255, 0) |
|
#define | IPV4_MULTICAST_INCB_PREFIX IPV4_ADDR(224, 0, 1, 0) |
|
#define | IPV4_MULTICAST_INCB_MASK IPV4_ADDR(255, 255, 255, 0) |
|
#define | IPV4_CLASS_A_ADDR IPV4_ADDR(0, 0, 0, 0) |
|
#define | IPV4_CLASS_A_MASK IPV4_ADDR(128, 0, 0, 0) |
|
#define | IPV4_CLASS_B_ADDR IPV4_ADDR(128, 0, 0, 0) |
|
#define | IPV4_CLASS_B_MASK IPV4_ADDR(192, 0, 0, 0) |
|
#define | IPV4_CLASS_C_ADDR IPV4_ADDR(192, 0, 0, 0) |
|
#define | IPV4_CLASS_C_MASK IPV4_ADDR(224, 0, 0, 0) |
|
#define | IPV4_CLASS_D_ADDR IPV4_ADDR(224, 0, 0, 0) |
|
#define | IPV4_CLASS_D_MASK IPV4_ADDR(240, 0, 0, 0) |
|
#define | IPV4_CLASS_E_ADDR IPV4_ADDR(240, 0, 0, 0) |
|
#define | IPV4_CLASS_E_MASK IPV4_ADDR(240, 0, 0, 0) |
|
#define | ipv4CopyAddr(destIpAddr, srcIpAddr) osMemcpy(destIpAddr, srcIpAddr, sizeof(Ipv4Addr)) |
|
#define | ipv4CompAddr(ipAddr1, ipAddr2) (!osMemcmp(ipAddr1, ipAddr2, sizeof(Ipv4Addr))) |
|
#define | ipv4IsOnSubnet(entry, ipAddr) (((ipAddr) & (entry)->subnetMask) == ((entry)->addr & (entry)->subnetMask)) |
|
#define | ipv4IsLoopbackAddr(ipAddr) (((ipAddr) & IPV4_LOOPBACK_MASK) == IPV4_LOOPBACK_PREFIX) |
|
#define | ipv4IsLinkLocalAddr(ipAddr) (((ipAddr) & IPV4_LINK_LOCAL_MASK) == IPV4_LINK_LOCAL_PREFIX) |
|
#define | ipv4IsMulticastAddr(ipAddr) (((ipAddr) & IPV4_MULTICAST_MASK) == IPV4_MULTICAST_PREFIX) |
|
|
enum | Ipv4AddrScope { IPV4_ADDR_SCOPE_INTERFACE_LOCAL = 1,
IPV4_ADDR_SCOPE_LINK_LOCAL = 2,
IPV4_ADDR_SCOPE_GLOBAL = 3
} |
| IPv4 address scopes. More...
|
|
enum | Ipv4AddrState { IPV4_ADDR_STATE_INVALID = 0,
IPV4_ADDR_STATE_TENTATIVE = 1,
IPV4_ADDR_STATE_VALID = 2
} |
| IPv4 address state. More...
|
|
enum | Ipv4TypeOfService {
IPV4_TOS_PRECEDENCE_ROUTINE = 0x00,
IPV4_TOS_PRECEDENCE_PRIORITY = 0x20,
IPV4_TOS_PRECEDENCE_IMMEDIATE = 0x40,
IPV4_TOS_PRECEDENCE_FLASH = 0x60,
IPV4_TOS_PRECEDENCE_FLASH_OVERRIDE = 0x80,
IPV4_TOS_PRECEDENCE_CRITIC_ECP = 0xA0,
IPV4_TOS_PRECEDENCE_INTERNETWORK_CTRL = 0xC0,
IPV4_TOS_PRECEDENCE_NETWORK_CTRL = 0xE0,
IPV4_TOS_NORMAL_DELAY = 0x00,
IPV4_TOS_LOW_DELAY = 0x10,
IPV4_TOS_NORMAL_THROUGHPUT = 0x00,
IPV4_TOS_HIGH_THROUGHPUT = 0x08,
IPV4_TOS_NORMAL_RELIBILITY = 0x00,
IPV4_TOS_HIGH_RELIBILITY = 0x04
} |
| IPv4 type-of-service. More...
|
|
enum | Ipv4FragmentOffset { IPV4_FLAG_RES = 0x8000,
IPV4_FLAG_DF = 0x4000,
IPV4_FLAG_MF = 0x2000,
IPV4_OFFSET_MASK = 0x1FFF
} |
| IPv4 fragment offset field. More...
|
|
enum | Ipv4Protocol {
IPV4_PROTOCOL_ICMP = 1,
IPV4_PROTOCOL_IGMP = 2,
IPV4_PROTOCOL_TCP = 6,
IPV4_PROTOCOL_UDP = 17,
IPV4_PROTOCOL_ESP = 50,
IPV4_PROTOCOL_AH = 51
} |
| IPv4 protocol field. More...
|
|
enum | Ipv4OptionType {
IPV4_OPTION_EEOL = 0,
IPV4_OPTION_NOP = 1,
IPV4_OPTION_RR = 7,
IPV4_OPTION_ZSU = 10,
IPV4_OPTION_MTUP = 11,
IPV4_OPTION_MTUR = 12,
IPV4_OPTION_ENCODE = 15,
IPV4_OPTION_QS = 25,
IPV4_OPTION_TS = 68,
IPV4_OPTION_TR = 82,
IPV4_OPTION_SEC = 130,
IPV4_OPTION_LSR = 131,
IPV4_OPTION_ESEC = 133,
IPV4_OPTION_CIPSO = 134,
IPV4_OPTION_SID = 136,
IPV4_OPTION_SSR = 137,
IPV4_OPTION_VISA = 142,
IPV4_OPTION_IMITD = 144,
IPV4_OPTION_EIP = 145,
IPV4_OPTION_ADDEXT = 147,
IPV4_OPTION_RTRALT = 148,
IPV4_OPTION_SDB = 149,
IPV4_OPTION_DPS = 151,
IPV4_OPTION_UMP = 152,
IPV4_OPTION_FINN = 205
} |
| IPv4 option types. More...
|
|
|
error_t | ipv4Init (NetInterface *interface) |
| IPv4 related initialization. More...
|
|
error_t | ipv4SetDefaultTtl (NetInterface *interface, uint8_t ttl) |
| Set default TTL value for outgoing IPv4 packets. More...
|
|
error_t | ipv4SetHostAddr (NetInterface *interface, Ipv4Addr addr) |
| Assign host address. More...
|
|
error_t | ipv4SetHostAddrEx (NetInterface *interface, uint_t index, Ipv4Addr addr) |
| Assign host address. More...
|
|
error_t | ipv4GetHostAddr (NetInterface *interface, Ipv4Addr *addr) |
| Retrieve host address. More...
|
|
error_t | ipv4GetHostAddrEx (NetInterface *interface, uint_t index, Ipv4Addr *addr) |
| Retrieve host address. More...
|
|
error_t | ipv4SetSubnetMask (NetInterface *interface, Ipv4Addr mask) |
| Configure subnet mask. More...
|
|
error_t | ipv4SetSubnetMaskEx (NetInterface *interface, uint_t index, Ipv4Addr mask) |
| Configure subnet mask. More...
|
|
error_t | ipv4GetSubnetMask (NetInterface *interface, Ipv4Addr *mask) |
| Retrieve subnet mask. More...
|
|
error_t | ipv4GetSubnetMaskEx (NetInterface *interface, uint_t index, Ipv4Addr *mask) |
| Retrieve subnet mask. More...
|
|
error_t | ipv4SetDefaultGateway (NetInterface *interface, Ipv4Addr addr) |
| Configure default gateway. More...
|
|
error_t | ipv4SetDefaultGatewayEx (NetInterface *interface, uint_t index, Ipv4Addr addr) |
| Configure default gateway. More...
|
|
error_t | ipv4GetDefaultGateway (NetInterface *interface, Ipv4Addr *addr) |
| Retrieve default gateway. More...
|
|
error_t | ipv4GetDefaultGatewayEx (NetInterface *interface, uint_t index, Ipv4Addr *addr) |
| Retrieve default gateway. More...
|
|
error_t | ipv4SetDnsServer (NetInterface *interface, uint_t index, Ipv4Addr addr) |
| Configure DNS server. More...
|
|
error_t | ipv4GetDnsServer (NetInterface *interface, uint_t index, Ipv4Addr *addr) |
| Retrieve DNS server. More...
|
|
void | ipv4LinkChangeEvent (NetInterface *interface) |
| Callback function for link change event. More...
|
|
void | ipv4ProcessPacket (NetInterface *interface, Ipv4Header *packet, size_t length, NetRxAncillary *ancillary) |
| Incoming IPv4 packet processing. More...
|
|
void | ipv4ProcessDatagram (NetInterface *interface, const NetBuffer *buffer, size_t offset, NetRxAncillary *ancillary) |
| Incoming IPv4 datagram processing. More...
|
|
error_t | ipv4SendDatagram (NetInterface *interface, const Ipv4PseudoHeader *pseudoHeader, NetBuffer *buffer, size_t offset, NetTxAncillary *ancillary) |
| Send an IPv4 datagram. More...
|
|
error_t | ipv4SendPacket (NetInterface *interface, const Ipv4PseudoHeader *pseudoHeader, uint16_t fragId, size_t fragOffset, NetBuffer *buffer, size_t offset, NetTxAncillary *ancillary) |
| Send an IPv4 packet. More...
|
|
error_t | ipv4StringToAddr (const char_t *str, Ipv4Addr *ipAddr) |
| Convert a dot-decimal string to a binary IPv4 address. More...
|
|
char_t * | ipv4AddrToString (Ipv4Addr ipAddr, char_t *str) |
| Convert a binary IPv4 address to dot-decimal notation. More...
|
|
void | ipv4DumpHeader (const Ipv4Header *ipHeader) |
| Dump IPv4 header for debugging purpose. More...
|
|
IPv4 (Internet Protocol Version 4)
License
SPDX-License-Identifier: GPL-2.0-or-later
Copyright (C) 2010-2024 Oryx Embedded SARL. All rights reserved.
This file is part of CycloneTCP Open.
This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation; either version 2 of the License, or (at your option) any later version.
This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details.
You should have received a copy of the GNU General Public License along with this program; if not, write to the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
- Author
- Oryx Embedded SARL (www.oryx-embedded.com)
- Version
- 2.4.4
Definition in file ipv4.h.