blob: db754fe7b0202cecec1e97765cd87088a55179b4 [file] [log] [blame]
Ratan Guptabbe45792018-03-23 00:22:55 +05301namespace phosphor
2{
3namespace network
4{
5namespace ncsi
6{
7
Ratan Guptaed5d7ff2018-03-23 00:27:52 +05308constexpr auto DEFAULT_VALUE = -1;
9constexpr auto NONE = 0;
10
Ratan Guptabbe45792018-03-23 00:22:55 +053011/* @brief This function will ask underlying NCSI driver
12 * to set a specific package or package/channel
13 * combination as the preferred choice.
14 * This function talks with the NCSI driver over
15 * netlink messages.
16 * @param[in] ifindex - Interface Index.
17 * @param[in] package - NCSI Package.
18 * @param[in] channel - Channel number with in the package.
19 * @returns 0 on success and negative value for failure.
20 */
21int setChannel(int ifindex, int package, int channel);
22
23/* @brief This function will ask underlying NCSI driver
24 * to clear any preferred setting from the given
25 * interface.
26 * This function talks with the NCSI driver over
27 * netlink messages.
28 * @param[in] ifindex - Interface Index.
29 * @returns 0 on success and negative value for failure.
30 */
31int clearInterface(int ifindex);
32
Ratan Guptaaac603e2018-03-23 00:25:54 +053033/* @brief This function is used to dump all the info
34 * of the package and the channels underlying
35 * the package.
36 * @param[in] ifindex - Interface Index.
37 * @param[in] package - NCSI Package.
38 * @returns 0 on success and negative value for failure.
39 */
40int getInfo(int ifindex, int package);
41
Gunnar Mills57d9c502018-09-14 14:42:34 -050042} // namespace ncsi
43} // namespace network
44} // namespace phosphor