@@ -86,13 +86,18 @@ type SimModeInfo struct {
8686
8787// CPIfaceInfo : CPIface interface settings.
8888type CPIfaceInfo struct {
89- Peers []string `json:"peers"`
90- UseFQDN bool `json:"use_fqdn"`
91- NodeID string `json:"hostname"`
92- HTTPPort string `json:"http_port"`
93- Dnn string `json:"dnn"`
94- EnableUeIPAlloc bool `json:"enable_ue_ip_alloc"`
95- UEIPPool string `json:"ue_ip_pool"`
89+ Peers []string `json:"peers"`
90+ UseFQDN bool `json:"use_fqdn"`
91+ NodeID string `json:"hostname"`
92+ HTTPPort string `json:"http_port"`
93+ DnnList []DNNInfo `json:"dnn_list"`
94+ EnableUeIPAlloc bool `json:"enable_ue_ip_alloc"`
95+ UEIPPool string `json:"ue_ip_pool"`
96+ }
97+
98+ type DNNInfo struct {
99+ DNN string `json:"dnn"`
100+ UEIPPool string `json:"ue_ip_pool"`
96101}
97102
98103// IfaceType : Gateway interface struct.
@@ -118,12 +123,12 @@ func validateConf(conf Conf) error {
118123 if err != nil {
119124 return ErrInvalidArgumentWithReason ("conf.P4rtcIface.AccessIP" , conf .P4rtcIface .AccessIP , err .Error ())
120125 }
121-
122- _ , _ , err = net .ParseCIDR (conf .CPIface .UEIPPool )
123- if err != nil {
124- return ErrInvalidArgumentWithReason ("conf.UEIPPool" , conf .CPIface .UEIPPool , err .Error ())
126+ for _ , dnn := range conf .CPIface .DnnList {
127+ _ , _ , err := net .ParseCIDR (dnn .UEIPPool )
128+ if err != nil {
129+ return ErrInvalidArgumentWithReason ("conf.CPIface.DnnList.UEIPPool" , dnn .UEIPPool , err .Error ())
130+ }
125131 }
126-
127132 if conf .Mode != "" {
128133 return ErrInvalidArgumentWithReason ("conf.Mode" , conf .Mode , "mode must not be set for UP4" )
129134 }
@@ -140,14 +145,14 @@ func validateConf(conf Conf) error {
140145 return ErrInvalidArgumentWithReason ("conf.Mode" , conf .Mode , "invalid mode" )
141146 }
142147 }
143-
144148 if conf .CPIface .EnableUeIPAlloc {
145- _ , _ , err := net .ParseCIDR (conf .CPIface .UEIPPool )
146- if err != nil {
147- return ErrInvalidArgumentWithReason ("conf.UEIPPool" , conf .CPIface .UEIPPool , err .Error ())
149+ for _ , dnn := range conf .CPIface .DnnList {
150+ _ , _ , err := net .ParseCIDR (dnn .UEIPPool )
151+ if err != nil {
152+ return ErrInvalidArgumentWithReason ("conf.CPIface.DnnList.UEIPPool" , dnn .UEIPPool , err .Error ())
153+ }
148154 }
149155 }
150-
151156 for _ , peer := range conf .CPIface .Peers {
152157 ip := net .ParseIP (peer )
153158 if ip == nil {
0 commit comments