1*b9022b53STaehee Yoo /* SPDX-License-Identifier: GPL-2.0-only WITH Linux-syscall-note */ 2*b9022b53STaehee Yoo /* 3*b9022b53STaehee Yoo * Copyright (c) 2021 Taehee Yoo <ap420073@gmail.com> 4*b9022b53STaehee Yoo */ 5*b9022b53STaehee Yoo #ifndef _UAPI_AMT_H_ 6*b9022b53STaehee Yoo #define _UAPI_AMT_H_ 7*b9022b53STaehee Yoo 8*b9022b53STaehee Yoo enum ifla_amt_mode { 9*b9022b53STaehee Yoo /* AMT interface works as Gateway mode. 10*b9022b53STaehee Yoo * The Gateway mode encapsulates IGMP/MLD traffic and decapsulates 11*b9022b53STaehee Yoo * multicast traffic. 12*b9022b53STaehee Yoo */ 13*b9022b53STaehee Yoo AMT_MODE_GATEWAY = 0, 14*b9022b53STaehee Yoo /* AMT interface works as Relay mode. 15*b9022b53STaehee Yoo * The Relay mode encapsulates multicast traffic and decapsulates 16*b9022b53STaehee Yoo * IGMP/MLD traffic. 17*b9022b53STaehee Yoo */ 18*b9022b53STaehee Yoo AMT_MODE_RELAY, 19*b9022b53STaehee Yoo __AMT_MODE_MAX, 20*b9022b53STaehee Yoo }; 21*b9022b53STaehee Yoo 22*b9022b53STaehee Yoo #define AMT_MODE_MAX (__AMT_MODE_MAX - 1) 23*b9022b53STaehee Yoo 24*b9022b53STaehee Yoo enum { 25*b9022b53STaehee Yoo IFLA_AMT_UNSPEC, 26*b9022b53STaehee Yoo /* This attribute specify mode etier Gateway or Relay. */ 27*b9022b53STaehee Yoo IFLA_AMT_MODE, 28*b9022b53STaehee Yoo /* This attribute specify Relay port. 29*b9022b53STaehee Yoo * AMT interface is created as Gateway mode, this attribute is used 30*b9022b53STaehee Yoo * to specify relay(remote) port. 31*b9022b53STaehee Yoo * AMT interface is created as Relay mode, this attribute is used 32*b9022b53STaehee Yoo * as local port. 33*b9022b53STaehee Yoo */ 34*b9022b53STaehee Yoo IFLA_AMT_RELAY_PORT, 35*b9022b53STaehee Yoo /* This attribute specify Gateway port. 36*b9022b53STaehee Yoo * AMT interface is created as Gateway mode, this attribute is used 37*b9022b53STaehee Yoo * as local port. 38*b9022b53STaehee Yoo * AMT interface is created as Relay mode, this attribute is not used. 39*b9022b53STaehee Yoo */ 40*b9022b53STaehee Yoo IFLA_AMT_GATEWAY_PORT, 41*b9022b53STaehee Yoo /* This attribute specify physical device */ 42*b9022b53STaehee Yoo IFLA_AMT_LINK, 43*b9022b53STaehee Yoo /* This attribute specify local ip address */ 44*b9022b53STaehee Yoo IFLA_AMT_LOCAL_IP, 45*b9022b53STaehee Yoo /* This attribute specify Relay ip address. 46*b9022b53STaehee Yoo * So, this is not used by Relay. 47*b9022b53STaehee Yoo */ 48*b9022b53STaehee Yoo IFLA_AMT_REMOTE_IP, 49*b9022b53STaehee Yoo /* This attribute specify Discovery ip address. 50*b9022b53STaehee Yoo * When Gateway get started, it send discovery message to find the 51*b9022b53STaehee Yoo * Relay's ip address. 52*b9022b53STaehee Yoo * So, this is not used by Relay. 53*b9022b53STaehee Yoo */ 54*b9022b53STaehee Yoo IFLA_AMT_DISCOVERY_IP, 55*b9022b53STaehee Yoo /* This attribute specify number of maximum tunnel. */ 56*b9022b53STaehee Yoo IFLA_AMT_MAX_TUNNELS, 57*b9022b53STaehee Yoo __IFLA_AMT_MAX, 58*b9022b53STaehee Yoo }; 59*b9022b53STaehee Yoo 60*b9022b53STaehee Yoo #define IFLA_AMT_MAX (__IFLA_AMT_MAX - 1) 61*b9022b53STaehee Yoo 62*b9022b53STaehee Yoo #endif /* _UAPI_AMT_H_ */ 63