blob: 452795923149ea61d9c2f2ea30365e25ce7e8e58 [file] [log] [blame]
//Á÷Á¿Í³¼Æ
#include <stdio.h>
#include <stdlib.h>
#include <time.h>
#include "cfg_api.h"
#include "message.h"
#include <errno.h>
#include <sys/types.h>
#include <sys/msg.h>
#include <sys/ipc.h>
#include <errno.h>
#include <syslog.h>
#include <pthread.h>
#include "softap_api.h"
#include "cfg_nv_def.h"
//#include "../DMC/rdm/oamInterface.h"
#define PROC_IF_STATISTIC "/proc/net/dev"
#define ERROR 1
#define OK 0
#define TXBYTE 0//·¢ËÍÊý¾Ý
#define TXPACKET 1
#define RXBYTE 2//½ÓÊÕÊý¾Ý
#define RXPACKET 3
#define TIME_SEM_KEY_1 0x0A2B
#define TIME_SEM_KEY_2 0x3A4B
#define FLUXSTAT_MAX_WAIT_TIME 60 //¼ÆÊ±×î´óµÈ´ýʱ³¤
union semun {
int val;
struct semid_ds *buf;
unsigned short *array;
};
struct date_time_t {
char day[3];
char month[3];
char year[5];
char hour[4];
char second[4];
char minute[4];
char weekday[4];
char nowtime[16];
};
typedef struct _fluxstat_info{
char total_flux[8];
char used_flux[32];
char warn_percent[4];
}fluxstat_info;
extern pthread_mutex_t g_getaddrinfo_mutex;
extern pthread_mutex_t g_getnameinfo_mutex;
void webui_time_nv_set();
int fluxstat_date_changed();
void flux_connect_time();