Back to home page

OSCL-LXR

 
 

    


0001 /* SPDX-License-Identifier: GPL-2.0+ WITH Linux-syscall-note */
0002 /*
0003  * INET     An implementation of the TCP/IP protocol suite for the LINUX
0004  *      operating system.  INET is implemented using the  BSD Socket
0005  *      interface as the means of communication with the user level.
0006  *
0007  *      Definitions for the UDP protocol.
0008  *
0009  * Version: @(#)udp.h   1.0.2   04/28/93
0010  *
0011  * Author:  Fred N. van Kempen, <waltje@uWalt.NL.Mugnet.ORG>
0012  *
0013  *      This program is free software; you can redistribute it and/or
0014  *      modify it under the terms of the GNU General Public License
0015  *      as published by the Free Software Foundation; either version
0016  *      2 of the License, or (at your option) any later version.
0017  */
0018 #ifndef _UAPI_LINUX_UDP_H
0019 #define _UAPI_LINUX_UDP_H
0020 
0021 #include <linux/types.h>
0022 
0023 struct udphdr {
0024     __be16  source;
0025     __be16  dest;
0026     __be16  len;
0027     __sum16 check;
0028 };
0029 
0030 /* UDP socket options */
0031 #define UDP_CORK    1   /* Never send partially complete segments */
0032 #define UDP_ENCAP   100 /* Set the socket to accept encapsulated packets */
0033 #define UDP_NO_CHECK6_TX 101    /* Disable sending checksum for UDP6X */
0034 #define UDP_NO_CHECK6_RX 102    /* Disable accpeting checksum for UDP6 */
0035 #define UDP_SEGMENT 103 /* Set GSO segmentation size */
0036 #define UDP_GRO     104 /* This socket can receive UDP GRO packets */
0037 
0038 /* UDP encapsulation types */
0039 #define UDP_ENCAP_ESPINUDP_NON_IKE  1 /* draft-ietf-ipsec-nat-t-ike-00/01 */
0040 #define UDP_ENCAP_ESPINUDP  2 /* draft-ietf-ipsec-udp-encaps-06 */
0041 #define UDP_ENCAP_L2TPINUDP 3 /* rfc2661 */
0042 #define UDP_ENCAP_GTP0      4 /* GSM TS 09.60 */
0043 #define UDP_ENCAP_GTP1U     5 /* 3GPP TS 29.060 */
0044 #define UDP_ENCAP_RXRPC     6
0045 #define TCP_ENCAP_ESPINTCP  7 /* Yikes, this is really xfrm encap types. */
0046 
0047 #endif /* _UAPI_LINUX_UDP_H */