130692c65c4174412c90e79489e98ab85c1a7412fBen Cheng/*
230692c65c4174412c90e79489e98ab85c1a7412fBen Cheng * INET		An implementation of the TCP/IP protocol suite for the LINUX
330692c65c4174412c90e79489e98ab85c1a7412fBen Cheng *		operating system.  INET is implemented using the  BSD Socket
430692c65c4174412c90e79489e98ab85c1a7412fBen Cheng *		interface as the means of communication with the user level.
530692c65c4174412c90e79489e98ab85c1a7412fBen Cheng *
630692c65c4174412c90e79489e98ab85c1a7412fBen Cheng *		Definitions for the UDP protocol.
730692c65c4174412c90e79489e98ab85c1a7412fBen Cheng *
830692c65c4174412c90e79489e98ab85c1a7412fBen Cheng * Version:	@(#)udp.h	1.0.2	04/28/93
930692c65c4174412c90e79489e98ab85c1a7412fBen Cheng *
1030692c65c4174412c90e79489e98ab85c1a7412fBen Cheng * Author:	Fred N. van Kempen, <waltje@uWalt.NL.Mugnet.ORG>
1130692c65c4174412c90e79489e98ab85c1a7412fBen Cheng *
1230692c65c4174412c90e79489e98ab85c1a7412fBen Cheng *		This program is free software; you can redistribute it and/or
1330692c65c4174412c90e79489e98ab85c1a7412fBen Cheng *		modify it under the terms of the GNU General Public License
1430692c65c4174412c90e79489e98ab85c1a7412fBen Cheng *		as published by the Free Software Foundation; either version
1530692c65c4174412c90e79489e98ab85c1a7412fBen Cheng *		2 of the License, or (at your option) any later version.
1630692c65c4174412c90e79489e98ab85c1a7412fBen Cheng */
1730692c65c4174412c90e79489e98ab85c1a7412fBen Cheng#ifndef _UAPI_LINUX_UDP_H
1830692c65c4174412c90e79489e98ab85c1a7412fBen Cheng#define _UAPI_LINUX_UDP_H
1930692c65c4174412c90e79489e98ab85c1a7412fBen Cheng
2030692c65c4174412c90e79489e98ab85c1a7412fBen Cheng#include <linux/types.h>
2130692c65c4174412c90e79489e98ab85c1a7412fBen Cheng
2230692c65c4174412c90e79489e98ab85c1a7412fBen Chengstruct udphdr {
2330692c65c4174412c90e79489e98ab85c1a7412fBen Cheng	__be16	source;
2430692c65c4174412c90e79489e98ab85c1a7412fBen Cheng	__be16	dest;
2530692c65c4174412c90e79489e98ab85c1a7412fBen Cheng	__be16	len;
2630692c65c4174412c90e79489e98ab85c1a7412fBen Cheng	__sum16	check;
2730692c65c4174412c90e79489e98ab85c1a7412fBen Cheng};
2830692c65c4174412c90e79489e98ab85c1a7412fBen Cheng
2930692c65c4174412c90e79489e98ab85c1a7412fBen Cheng/* UDP socket options */
3030692c65c4174412c90e79489e98ab85c1a7412fBen Cheng#define UDP_CORK	1	/* Never send partially complete segments */
3130692c65c4174412c90e79489e98ab85c1a7412fBen Cheng#define UDP_ENCAP	100	/* Set the socket to accept encapsulated packets */
3230692c65c4174412c90e79489e98ab85c1a7412fBen Cheng
3330692c65c4174412c90e79489e98ab85c1a7412fBen Cheng/* UDP encapsulation types */
3430692c65c4174412c90e79489e98ab85c1a7412fBen Cheng#define UDP_ENCAP_ESPINUDP_NON_IKE	1 /* draft-ietf-ipsec-nat-t-ike-00/01 */
3530692c65c4174412c90e79489e98ab85c1a7412fBen Cheng#define UDP_ENCAP_ESPINUDP	2 /* draft-ietf-ipsec-udp-encaps-06 */
3630692c65c4174412c90e79489e98ab85c1a7412fBen Cheng#define UDP_ENCAP_L2TPINUDP	3 /* rfc2661 */
3730692c65c4174412c90e79489e98ab85c1a7412fBen Cheng
3830692c65c4174412c90e79489e98ab85c1a7412fBen Cheng
3930692c65c4174412c90e79489e98ab85c1a7412fBen Cheng#endif /* _UAPI_LINUX_UDP_H */
40