blob: 6b6aac8895caa1f35064b4f3b63ce48898a966fe [file] [log] [blame]
Naveen Sampath04696f72022-06-13 15:19:14 +05301/*
2* Copyright 2022-present Open Networking Foundation
3* Licensed under the Apache License, Version 2.0 (the "License");
4* you may not use this file except in compliance with the License.
5* You may obtain a copy of the License at
6*
7* http://www.apache.org/licenses/LICENSE-2.0
8*
9* Unless required by applicable law or agreed to in writing, software
10* distributed under the License is distributed on an "AS IS" BASIS,
11* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
12* See the License for the specific language governing permissions and
13* limitations under the License.
14 */
15
16package common
17
18// IGMPConfig identifies the IGMP Configuration parameters.
19type IGMPConfig struct {
20 // ProfileID represents IGMP profile ID
21 ProfileID string `json:"ProfileID"`
22 // ProfileName represents IGMP profile Name
23 ProfileName string `json:"ProfileName"`
24 // UnsolicitedTimeOut represents unsolicited timeout.
25 UnsolicitedTimeOut int `json:"UnsolicitedTimeOut"`
26 // MaxResp represents IGMP max response time.
27 MaxResp int `json:"MaxResp"`
28 // KeepAliveInterval represents IGMP keep alive interval.
29 KeepAliveInterval int `json:"KeepAliveInterval"`
30 // KeepAliveCount represents IGMP keep alive count.
31 KeepAliveCount int `json:"KeepAliveCount"`
32 // LastQueryInterval represents IGMP last query interval.
33 LastQueryInterval int `json:"LastQueryInterval"`
34 // LastQueryCount represents IGMP last query count.
35 LastQueryCount int `json:"LastQueryCount"`
36 // FastLeave represents IGMP fast leave enabled or not.
37 FastLeave *bool `json:"FastLeave"`
38 // PeriodicQuery represents IGMP period query interval.
39 PeriodicQuery *bool `json:"PeriodicQuery"`
40 // IgmpCos represents IGMP COS value(0-7).
41 IgmpCos int `json:"IgmpCos"`
42 // WithRAUpLink represents IGMP RA uplink.
43 WithRAUpLink *bool `json:"withRAUpLink"`
44 // WithRADownLink represents IGMP RA downlink.
45 WithRADownLink *bool `json:"withRADownLink"`
46 // IgmpVerToServer represents IGMP version.
47 IgmpVerToServer string `json:"igmpVerToServer"`
48 // IgmpSourceIP represents IGMP src ip.
49 IgmpSourceIP string `json:"igmpSourceIp"`
50}
51
52//MulticastSrcListMode represents mode of source list
53type MulticastSrcListMode string
54
55const (
56 //Include refers to MulticastSrcListMode as include
57 Include MulticastSrcListMode = "include"
58 //Exclude refers to MulticastSrcListMode as exclude
59 Exclude MulticastSrcListMode = "exclude"
60 // StaticGroup refes to the static group name
61 StaticGroup string = "static"
62 // IsStaticYes refes to the static flag value yes
63 IsStaticYes string = "yes"
64 // IsStaticNo refes to the static flag value no
65 IsStaticNo string = "no"
66)
67
68// MulticastGroupProxy identifies source specific multicast(SSM) config.
69type MulticastGroupProxy struct {
70 // Mode represents source list include/exclude
71 Mode MulticastSrcListMode `json:"Mode"`
72 // SourceList represents list of multicast server IP addresses.
73 SourceList []string `json:"SourceList"`
74 // IsStatic flag indicating if the group is a "static" group
75 IsStatic string `json:"IsStatic,omitempty"`
76}
77
78// MVLANProfile identifies the MVLAN profile.
79type MVLANProfile struct {
80 // VLANID represents the Multicast VLAN ID.
81 VLANID int `json:"VLANID"`
82 // ProfileID represents Multicast profile ID
83 ProfileID string `json:"ProfileID"`
84 // ProfileName represents Multicast profile Name
85 ProfileName string `json:"ProfileName"`
86 // PonVLAN represents the vlan, where mcast traffic will be translated at OLT
87 PonVLAN int `json:"PonVLAN"`
88 // Groups represents the MVLAN group information. Key will be group name and value as array of multicast channel IPs.
89 Groups map[string][]string `json:"Groups"`
90 // Proxy represents multicast group proxy info. Key will be group name and value as proxy info
91 Proxy map[string]MulticastGroupProxy `json:"Proxy"`
92 //IsChannelBasedGroup represents if the group is channel based
93 IsChannelBasedGroup bool `json:"IsChannelBasedGroup"`
94 // ActiveIgmpChannelsPerSubscriber represents maximum igmp channels per subscriber can use
95 // Default : 3
96 ActiveIgmpChannelsPerSubscriber int `json:"ActiveIgmpChannelsPerSubscriber"`
97}
98
99// McastConfig the structure for multicast config
100type McastConfig struct {
101 MVLANProfileID string
102 IGMPProfileID string
103 IGMPSrcIP string
104}