|
RDK Documentation (Open Sourced RDK Components)
|
Go to the documentation of this file.
37 #ifndef _NETSRVMGRUTILES_H_
38 #define _NETSRVMGRUTILES_H_
48 #define MAC_ADDR_BUFF_LEN 18
50 #define SYSTEM_COMMAND_SHELL_NOT_FOUND 127
51 #define SYSTEM_COMMAND_SHELL_SUCESS 23
52 #define SYSTEM_COMMAND_ERROR -1
53 #define BUFFER_SIZE_SCRIPT_OUTPUT 512
57 #ifdef USE_TELEMETRY_2_0
59 #include <telemetry_busmessage_sender.h>
61 void telemetry_init(
char* name);
62 void telemetry_event_s(
char* marker,
char* value);
63 void telemetry_event_d(
char* marker,
int value);
65 #endif // #ifdef USE_TELEMETRY_2_0
67 namespace netSrvMgrUtiles
92 void triggerDhcpRenew(
const char* interface = NULL);
93 void triggerDhcpReleaseAndRenew(
const char* interface);
151 bool getSTBip(
char *stbip,
bool *isIpv6);
163 bool getInterfaceConfig(
const char *ifName,
const unsigned int family,
char *interfaceIp,
char *netMask);
173 bool getDNSip(
const unsigned int family,
char *primaryDNS,
char *secondaryDNS);
183 bool getSTBip_family(
char *stbip,
const char *family);
242 bool getCommandOutput(
const char *command,
char *output_buffer,
size_t output_buffer_size);
252 bool getNetMask_IfName(
const char *ifName_in,
const unsigned int,
char *netMask_out);
bool getDNSip(const unsigned int family, char *primaryDNS, char *secondaryDNS)
This function is used to get Interface IP address and on which interface.
bool chk_ipaddr_linklocal(const char *stbip, unsigned int family)
This function checks whether IP string(IPv4 and IPv6) is link local address or not.
bool check_global_v6_based_macaddress(std::string ipv6Addr, std::string macAddr)
This function checks whether the input ipv6 address is based on specified mac address.
bool check_global_v6_ula_address(std::string ipv6Addr)
This function checks whether the input ipv6 address is Unique Local Address.
bool checkInterfaceActive(char *interfaceName)
This function returns the Ethernet active status of the interface, if finds the status from interface...
bool readDevFile(char *deviceName)
This function gets the device interface type(Ethernet/MOCA/WIFI) of the input device name....
bool getSTBip(char *stbip, bool *isIpv6)
This function is used to get STB IP address and its IP version.
char getAllNetworkInterface(char *devAllInterface)
This function parse all the device interface details and gives all the network interface device name ...
bool getInterfaceConfig(const char *ifName, const unsigned int family, char *interfaceIp, char *netMask)
This function is used to get Interface IP address and on which interface.
bool getMacAddress_IfName(const char *ifName_in, char macAddress_out[18])
This function is used to get the MAC address for the provided interface.
void triggerDhcpLease(const char *operation, const char *interface)
This function trigger the process by which the DHCP client renews or updates its IP address configura...
bool getRouteInterfaceType(char *devname)
This function gets the active interface device type(Ethernet/MOCA/WIFI).
bool getCommandOutput(const char *command, char *output_buffer, size_t output_buffer_size)
This function is used to get the output of running the specified command.
bool isIPv4AddressScopeDocumentation(const std::string &ipv4_address)
This function checks if the input ipv4 address is a unicast address reserved for documentation.
bool currentActiveInterface(char *currentInterface)
This function is used to get the current active interface(WIFI/MOCA).
bool getCurrentTime(char *currTime, const char *timeFormat)
This function retrieves the current time using the requested format specifier.
bool getRouteInterface(char *devname)
This function retrieves information about the active routing interface.
bool getNetMask_IfName(const char *ifName_in, const unsigned int, char *netMask_out)
This function is used to get the NetMask address for the provided interface.