Zephyr API Documentation 4.4.99
A Scalable Open Source RTOS
Loading...
Searching...
No Matches
Socket options for IPv4

Macros

#define ZSOCK_IP_TOS   1
 Set or receive the Type-Of-Service value for an outgoing packet.
#define ZSOCK_IP_TTL   2
 Set or receive the Time-To-Live value for an outgoing packet.
#define ZSOCK_IP_PKTINFO   8
 Pass an IP_PKTINFO ancillary message that contains a pktinfo structure that supplies some information about the incoming packet.
#define ZSOCK_IP_RECVTTL   12
 Pass an IP_RECVTTL ancillary message that contains information about the time to live of the incoming packet.
#define ZSOCK_IP_MTU   14
 Retrieve the current known path MTU of the current socket.
#define ZSOCK_IP_DONTFRAG   15
 Disable local IPv4 fragmentation for packets sent on this socket.
#define ZSOCK_IP_MULTICAST_IF   32
 Set IPv4 multicast datagram network interface.
#define ZSOCK_IP_MULTICAST_TTL   33
 Set IPv4 multicast TTL value.
#define ZSOCK_IP_MULTICAST_LOOP   34
 Set IPv4 multicast loop value.
#define ZSOCK_IP_ADD_MEMBERSHIP   35
 Join IPv4 multicast group.
#define ZSOCK_IP_DROP_MEMBERSHIP   36
 Leave IPv4 multicast group.
#define ZSOCK_IP_LOCAL_PORT_RANGE   51
 Clamp down the global port range for a given socket.

Detailed Description

Macro Definition Documentation

◆ ZSOCK_IP_ADD_MEMBERSHIP

#define ZSOCK_IP_ADD_MEMBERSHIP   35

#include <zephyr/net/socket.h>

Join IPv4 multicast group.

◆ ZSOCK_IP_DONTFRAG

#define ZSOCK_IP_DONTFRAG   15

#include <zephyr/net/socket.h>

Disable local IPv4 fragmentation for packets sent on this socket.

Takes an integer boolean (0 = allow fragmentation, non-zero = disable). When enabled, datagrams larger than the interface MTU are rejected locally with errno set to EMSGSIZE instead of being fragmented. For IPv4 this also sets the Don't Fragment (DF) bit in the IP header.

Valid for setsockopt() and getsockopt() at the NET_IPPROTO_IP level.

◆ ZSOCK_IP_DROP_MEMBERSHIP

#define ZSOCK_IP_DROP_MEMBERSHIP   36

#include <zephyr/net/socket.h>

Leave IPv4 multicast group.

◆ ZSOCK_IP_LOCAL_PORT_RANGE

#define ZSOCK_IP_LOCAL_PORT_RANGE   51

#include <zephyr/net/socket.h>

Clamp down the global port range for a given socket.

◆ ZSOCK_IP_MTU

#define ZSOCK_IP_MTU   14

#include <zephyr/net/socket.h>

Retrieve the current known path MTU of the current socket.

Returns an integer. ZSOCK_IP_MTU is valid only for getsockopt and can be employed only when the socket has been connected.

◆ ZSOCK_IP_MULTICAST_IF

#define ZSOCK_IP_MULTICAST_IF   32

#include <zephyr/net/socket.h>

Set IPv4 multicast datagram network interface.

◆ ZSOCK_IP_MULTICAST_LOOP

#define ZSOCK_IP_MULTICAST_LOOP   34

#include <zephyr/net/socket.h>

Set IPv4 multicast loop value.

◆ ZSOCK_IP_MULTICAST_TTL

#define ZSOCK_IP_MULTICAST_TTL   33

#include <zephyr/net/socket.h>

Set IPv4 multicast TTL value.

◆ ZSOCK_IP_PKTINFO

#define ZSOCK_IP_PKTINFO   8

#include <zephyr/net/socket.h>

Pass an IP_PKTINFO ancillary message that contains a pktinfo structure that supplies some information about the incoming packet.

◆ ZSOCK_IP_RECVTTL

#define ZSOCK_IP_RECVTTL   12

#include <zephyr/net/socket.h>

Pass an IP_RECVTTL ancillary message that contains information about the time to live of the incoming packet.

◆ ZSOCK_IP_TOS

#define ZSOCK_IP_TOS   1

#include <zephyr/net/socket.h>

Set or receive the Type-Of-Service value for an outgoing packet.

◆ ZSOCK_IP_TTL

#define ZSOCK_IP_TTL   2

#include <zephyr/net/socket.h>

Set or receive the Time-To-Live value for an outgoing packet.