RDK Documentation (Open Sourced RDK Components)
Device_DeviceInfo.cpp File Reference

This source file contains the APIs for getting device information. More...

#include <fstream>
#include <cmath>
#include <cstring>
#include <sys/stat.h>
#include <sys/sysinfo.h>
#include <sys/ioctl.h>
#include <net/if.h>
#include <sys/wait.h>
#include <sys/socket.h>
#include <netinet/in.h>
#include <arpa/inet.h>
#include <errno.h>
#include <ifaddrs.h>
#include <sys/inotify.h>
#include <map>
#include <string>
#include <iostream>
#include <algorithm>
#include <dirent.h>
#include "libIBus.h"
#include "mfrMgr.h"
#include "Device_DeviceInfo.h"
#include "hostIf_utils.h"
#include "pwrMgr.h"
#include <curl/curl.h>
#include "dsTypes.h"
#include "host.hpp"
#include "manager.hpp"
#include "dsError.h"
#include "audioOutputPort.hpp"
#include "sysMgr.h"
#include "hostIf_NotificationHandler.h"
#include "safec_lib.h"
Include dependency graph for Device_DeviceInfo.cpp:

Go to the source code of this file.

Macros

#define VERSION_FILE   "/version.txt"
 
#define SOC_ID_FILE   "/var/log/socprov.log"
 
#define PREFERRED_GATEWAY_FILE   "/opt/prefered-gateway"
 
#define FORWARD_SSH_FILE   "/opt/secure/.RFC_ForwardSSH"
 
#define GATEWAY_NAME_SIZE   4
 
#define IPREMOTE_SUPPORT_STATUS_FILE   "/opt/.ipremote_status"
 
#define XRE_CONTAINER_SUPPORT_STATUS_FILE   "/opt/XRE_container_enable"
 
#define IPREMOTE_INTERFACE_INFO   "/tmp/ipremote_interface_info"
 
#define MODEL_NAME_FILE   "/tmp/.model"
 
#define PREVIOUS_REBOT_REASON_FILE   "/opt/secure/reboot/previousreboot.info"
 
#define NTPENABLED_FILE   "/opt/.ntpEnabled"
 
#define TR069DOSLIMIT_THRESHOLD   "Device.DeviceInfo.X_RDKCENTRAL-COM_RFC.Feature.Tr069DoSLimit.Threshold"
 
#define MIN_TR69_DOS_THRESHOLD   0
 
#define MAX_TR69_DOS_THRESHOLD   30
 
#define HTTP_OK   200
 
#define MIN_PORT_RANGE   3000
 
#define MAX_PORT_RANGE   3020
 
#define DEVICEID_SCRIPT_PATH   "/lib/rdk/getDeviceId.sh"
 
#define SCRIPT_OUTPUT_BUFFER_SIZE   512
 

Functions

void * ResetFunc (void *)
 This method resets according to the STB reset state such as NoReset, ColdReset FactoryReset, WarehouseReset and CustomerReset.
 
static int get_ParamValue_From_TR69Agent (HOSTIF_MsgData_t *)
 
static int get_PartnerId_From_Script (string &)
 
static size_t writeCurlResponse (void *ptr, size_t size, size_t nmemb, string stream)
 
static void Replace_AllOccurrence (char *str, int size, char ch, char Newch)
 
static bool ValidateInput_Arguments (char *input, FILE *tmp_fptr)
 

Variables

static char stbMacCache [TR69HOSTIFMGR_MAX_PARAM_LEN] = {'\0'}
 
static string reverseSSHArgs
 
map< string, string > stunnelSSHArgs
 
const string sshCommand = "/lib/rdk/startTunnel.sh"
 
const string stunnelCommand = "/lib/rdk/startStunnel.sh"
 

yes

This source file contains the APIs for getting device information.

Definition in file Device_DeviceInfo.cpp.