mirror of
https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git
synced 2025-01-17 10:46:33 +00:00
999cb275c8
Add new iflink attributes to configure in-kernel UDP listener socket address: IFLA_GTP_LOCAL and IFLA_GTP_LOCAL6. If none of these attributes are specified, default is still to IPv4 INADDR_ANY for backward compatibility. Add new attributes to set up family and IPv6 address of GTP tunnels: GTPA_FAMILY, GTPA_PEER_ADDR6 and GTPA_MS_ADDR6. If no GTPA_FAMILY is specified, AF_INET is assumed for backward compatibility. setsockopt IPV6_ADDRFORM allows to downgrade socket from IPv6 to IPv4 after socket is bound. Assumption is that socket listener that is attached to the gtp device needs to be either IPv4 or IPv6. Therefore, GTP socket listener does not allow for IPv4-mapped-IPv6 listener. Signed-off-by: Pablo Neira Ayuso <pablo@netfilter.org>
42 lines
797 B
C
42 lines
797 B
C
/* SPDX-License-Identifier: GPL-2.0 WITH Linux-syscall-note */
|
|
#ifndef _UAPI_LINUX_GTP_H_
|
|
#define _UAPI_LINUX_GTP_H_
|
|
|
|
#define GTP_GENL_MCGRP_NAME "gtp"
|
|
|
|
enum gtp_genl_cmds {
|
|
GTP_CMD_NEWPDP,
|
|
GTP_CMD_DELPDP,
|
|
GTP_CMD_GETPDP,
|
|
GTP_CMD_ECHOREQ,
|
|
|
|
GTP_CMD_MAX,
|
|
};
|
|
|
|
enum gtp_version {
|
|
GTP_V0 = 0,
|
|
GTP_V1,
|
|
};
|
|
|
|
enum gtp_attrs {
|
|
GTPA_UNSPEC = 0,
|
|
GTPA_LINK,
|
|
GTPA_VERSION,
|
|
GTPA_TID, /* for GTPv0 only */
|
|
GTPA_PEER_ADDRESS, /* Remote GSN peer, either SGSN or GGSN */
|
|
#define GTPA_SGSN_ADDRESS GTPA_PEER_ADDRESS /* maintain legacy attr name */
|
|
GTPA_MS_ADDRESS,
|
|
GTPA_FLOW,
|
|
GTPA_NET_NS_FD,
|
|
GTPA_I_TEI, /* for GTPv1 only */
|
|
GTPA_O_TEI, /* for GTPv1 only */
|
|
GTPA_PAD,
|
|
GTPA_PEER_ADDR6,
|
|
GTPA_MS_ADDR6,
|
|
GTPA_FAMILY,
|
|
__GTPA_MAX,
|
|
};
|
|
#define GTPA_MAX (__GTPA_MAX - 1)
|
|
|
|
#endif /* _UAPI_LINUX_GTP_H_ */
|