include: modify for support socat, so need add some macro same as linux

add the necessary definitions to the Header File

Signed-off-by: daichuan<daichuan@xiaomi.com>
This commit is contained in:
daichuan
2024-09-30 11:28:42 +08:00
committed by Xiang Xiao
parent 09e12a58d3
commit ba54829239
3 changed files with 11 additions and 0 deletions
+4
View File
@@ -59,6 +59,10 @@
#define IFF_MULTICAST (1 << 12) /* Supports multicast. */
#define IFF_BROADCAST (1 << 13) /* Broadcast address valid. */
#define IFF_DYNAMIC (1 << 15) /* Dialup device with changing addresses. */
#define IFF_DEBUG (1 << 16) /* Turn on debugging. */
#define IFF_NOTRAILERS (1 << 17) /* Avoid use of trailers. */
#define IFF_PROMISC (1 << 18) /* Receive all packets. */
#define IFF_ALLMULTI (1 << 19) /* Receive all multicast packets. */
/* Interface flag helpers */
+1
View File
@@ -46,6 +46,7 @@
#define ETH_MIN_MTU 68 /* Min IPv4 MTU per RFC791 */
#define ETH_MAX_MTU 0xFFFFU /* 65535, same as IP_MAX_MTU */
#define ETH_P_ALL 0x0003 /* Every packet (be careful!!!) */
#define ETH_P_IP ETHERTYPE_IP
#define ETH_P_ARP ETHERTYPE_ARP
+6
View File
@@ -50,6 +50,7 @@
#define IXON (1 << 10) /* Bit 10: Enable start/stop output control */
#define IXANY (1 << 11) /* Bit 11: Enable any character to restart output */
#define IXOFF (1 << 12) /* Bit 12: Enable start/stop input control */
#define IMAXBEL (1 << 13) /* Bit 13: Ring bell when input queue is full */
/* Terminal output modes (c_oflag in the termios structure) */
@@ -111,6 +112,9 @@
#define ECHONL (1 << 6) /* Bit 6: Echo NL */
#define NOFLSH (1 << 7) /* Bit 7: Disable flush after interrupt or quit */
#define TOSTOP (1 << 8) /* Bit 8: Send SIGTTOU for background output */
#define ECHOCTL (1 << 9) /* Bit 9: Echo control characters as ^X */
#define ECHOKE (1 << 11) /* Bit 11: Visual erase for KILL */
#define FLUSHO (1 << 12) /* Bit 12: Flush output to terminal */
#define IEXTEN (1 << 15) /* Bit 15: Enable extended input character processing */
/* The following are subscript names for the termios c_cc array.
@@ -148,6 +152,8 @@
#define VSUSP 10 /* Bit 10: SUSP character */
#define VEOL 11 /* Bit 11: EOL character (canonical mode) */
#define NCCS 12 /* Bit 12: Size of the array c_cc for control characters */
#define VLNEXT 15 /* Bit 15: Literal-next character */
#define VEOL2 16 /* Bit 16: Second EOL character */
/* Baud Rate Selection. These are instances of type speed_t. Values of
* 38400 and below are specified by POSIX; values above 38400 are sometimes