@@ -94,6 +94,21 @@ type Subscriber struct {
9494 Opc string `json:"opc"`
9595}
9696
97+ // NetworkRule is a per-policy filter rule. Identified by
98+ // (policy_name, direction, precedence); precedence is 1-indexed and
99+ // unique within (policy_name, direction).
100+ type NetworkRule struct {
101+ PolicyName string `json:"policy_name"`
102+ Direction string `json:"direction"` // "uplink" or "downlink"
103+ Precedence int32 `json:"precedence"`
104+ Description string `json:"description"`
105+ RemotePrefix * string `json:"remote_prefix,omitempty"`
106+ Protocol int32 `json:"protocol"`
107+ PortLow int32 `json:"port_low"`
108+ PortHigh int32 `json:"port_high"`
109+ Action string `json:"action"` // "allow" or "deny"
110+ }
111+
97112type Route struct {
98113 ID int64 `json:"id"`
99114 Destination string `json:"destination"`
@@ -102,6 +117,38 @@ type Route struct {
102117 Metric int `json:"metric"`
103118}
104119
120+ type BGPSettings struct {
121+ Enabled bool `json:"enabled"`
122+ LocalAS int `json:"local_as"`
123+ RouterID string `json:"router_id"`
124+ ListenAddress string `json:"listen_address"`
125+ }
126+
127+ // BGPPeer is per-node: each Core receives only the peers Fleet has
128+ // scoped to the node making the sync request, and reconciles its local
129+ // bgp_peers table against that list. Address is unique per node.
130+ type BGPPeer struct {
131+ Address string `json:"address"`
132+ RemoteAS int `json:"remote_as"`
133+ HoldTime int `json:"hold_time"`
134+ Password string `json:"password,omitempty"`
135+ Description string `json:"description"`
136+ }
137+
138+ // BGPImportPrefix references a peer by its Address (natural key).
139+ type BGPImportPrefix struct {
140+ PeerAddress string `json:"peer_address"`
141+ Prefix string `json:"prefix"`
142+ MaxLength int `json:"max_length"`
143+ }
144+
145+ // RetentionPolicy holds the retention days for a single category:
146+ // "audit", "radio", "usage", or "flow_reports".
147+ type RetentionPolicy struct {
148+ Category string `json:"category"`
149+ Days int `json:"days"`
150+ }
151+
105152type N2Interface struct {
106153 Address string `json:"address"`
107154 Port int `json:"port"`
@@ -137,21 +184,26 @@ type StatusNetworkInterfaces struct {
137184}
138185
139186type Networking struct {
140- DataNetworks []DataNetwork `json:"data_networks"`
141- Routes []Route `json:"routes"`
142- NAT bool `json:"nat"`
143- FlowAccounting bool `json:"flow_accounting"`
144- N3ExternalAddress string `json:"n3_external_address"`
187+ DataNetworks []DataNetwork `json:"data_networks"`
188+ Routes []Route `json:"routes"`
189+ NAT bool `json:"nat"`
190+ FlowAccounting bool `json:"flow_accounting"`
191+ N3ExternalAddress string `json:"n3_external_address"`
192+ BGP BGPSettings `json:"bgp"`
193+ BGPPeers []BGPPeer `json:"bgp_peers"`
194+ BGPImportPrefixes []BGPImportPrefix `json:"bgp_import_prefixes"`
145195}
146196
147197type EllaCoreConfig struct {
148- Operator Operator `json:"operator"`
149- HomeNetworkKeys []HomeNetworkKey `json:"home_network_keys"`
150- Networking Networking `json:"networking"`
151- Profiles []Profile `json:"profiles"`
152- Slices []Slice `json:"slices"`
153- Policies []Policy `json:"policies"`
154- Subscribers []Subscriber `json:"subscribers"`
198+ Operator Operator `json:"operator"`
199+ HomeNetworkKeys []HomeNetworkKey `json:"home_network_keys"`
200+ Networking Networking `json:"networking"`
201+ Profiles []Profile `json:"profiles"`
202+ Slices []Slice `json:"slices"`
203+ Policies []Policy `json:"policies"`
204+ NetworkRules []NetworkRule `json:"network_rules"`
205+ Subscribers []Subscriber `json:"subscribers"`
206+ RetentionPolicies []RetentionPolicy `json:"retention_policies"`
155207}
156208
157209type PlmnID struct {
0 commit comments