8 #ifndef NTV2MBCONTROLLER_H
9 #define NTV2MBCONTROLLER_H
46 #define NTV2_IS_VALID_SFP(__sfp__) (((__sfp__) >= SFP_1) && ((__sfp__) < SFP_INVALID))
100 #define IGMPCB_REG_STATE 0
101 #define IGMPCB_REG_MCAST_ADDR 1
102 #define IGMPCB_REG_SRC_ADDR 2
103 #define IGMPCB_SIZE 3
105 #define IGMPCB_STATE_USED BIT(0)
106 #define IGMPCB_STATE_ENABLED BIT(1)
107 #define IGMPCB_STATE_BUSY BIT(31) // ignore when busy
109 #define S2022_LINK_A_ACTIVE BIT(31)
110 #define S2022_LINK_B_ACTIVE BIT(30)
111 #define S2022_DUAL_LINK BIT(29)
135 bool SetMBNetworkConfiguration(
eSFP port, std::string ipaddr, std::string netmask,std::string gateway);
136 bool DisableNetworkInterface(
eSFP port);
137 bool GetRemoteMAC(std::string remote_IPAddress,
eSFP port,
NTV2Stream stream, std::string & MACaddress);
138 bool SetIGMPVersion(uint32_t version);
140 void SetIGMPGroup(
eSFP port,
NTV2Stream stream, uint32_t mcast_addr, uint32_t src_addr,
bool enable);
144 bool SetTxLinkState(
NTV2Channel channel,
bool sfp1Enable,
bool sfp2Enable);
145 bool GetTxLinkState(
NTV2Channel channel,
bool & sfp1Enable,
bool & sfp2Enable);
146 bool SetRxLinkState(
NTV2Channel channel,
bool sfp1Enable,
bool sfp2Enable);
147 bool GetRxLinkState(
NTV2Channel channel,
bool & sfp1Enable,
bool & sfp2Enable);
149 bool SetDualLinkMode(
bool enable);
150 bool GetDualLinkMode(
bool & enable);
155 bool SetSFPActive(
eSFP sfp);
156 bool SetSFPInactive(
eSFP sfp);
157 bool GetSFPActive(
eSFP sfp);
162 uint64_t GetNTPTimestamp();
163 bool PushSDP(std::string filename, std::stringstream & sdpstream);
164 bool GetSDP(std::string url, std::string & sdp);
168 bool SetLLDPInfo(std::string sysname);
169 bool GetLLDPInfo(std::string &chassisId0, std::string &portId0,
170 std::string &chassisId1, std::string &portId1);
174 eArpState GetRemoteMACFromArpTable(std::string remote_IPAddress,
eSFP port,
NTV2Stream stream, std::string & MACaddress);
175 bool SendArpRequest(std::string remote_IPAddress,
eSFP port);
177 void splitResponse(
const std::string response, std::vector<std::string> & results);
178 bool getDecimal(
const std::string & resp,
const std::string & parm, uint32_t & result);
179 bool getHex(
const std::string & resp,
const std::string & parm, uint32_t &result);
180 bool getString(
const std::string & resp,
const std::string & parm, std::string & result);
186 #endif // NTV2MBCONTROLLER_H