blob: 452795923149ea61d9c2f2ea30365e25ce7e8e58 [file] [log] [blame]
lh9ed821d2023-04-07 01:36:19 -07001//Á÷Á¿Í³¼Æ
2#include <stdio.h>
3#include <stdlib.h>
4#include <time.h>
5#include "cfg_api.h"
6#include "message.h"
7#include <errno.h>
8#include <sys/types.h>
9#include <sys/msg.h>
10#include <sys/ipc.h>
11#include <errno.h>
12#include <syslog.h>
13#include <pthread.h>
14#include "softap_api.h"
15#include "cfg_nv_def.h"
16
17//#include "../DMC/rdm/oamInterface.h"
18
19#define PROC_IF_STATISTIC "/proc/net/dev"
20#define ERROR 1
21#define OK 0
22
23#define TXBYTE 0//·¢ËÍÊý¾Ý
24#define TXPACKET 1
25#define RXBYTE 2//½ÓÊÕÊý¾Ý
26#define RXPACKET 3
27#define TIME_SEM_KEY_1 0x0A2B
28#define TIME_SEM_KEY_2 0x3A4B
29
30#define FLUXSTAT_MAX_WAIT_TIME 60 //¼ÆÊ±×î´óµÈ´ýʱ³¤
31
32union semun {
33 int val;
34 struct semid_ds *buf;
35 unsigned short *array;
36};
37
38struct date_time_t {
39 char day[3];
40 char month[3];
41 char year[5];
42 char hour[4];
43 char second[4];
44 char minute[4];
45 char weekday[4];
46 char nowtime[16];
47};
48
49typedef struct _fluxstat_info{
50 char total_flux[8];
51 char used_flux[32];
52 char warn_percent[4];
53}fluxstat_info;
54
55extern pthread_mutex_t g_getaddrinfo_mutex;
56extern pthread_mutex_t g_getnameinfo_mutex;
57void webui_time_nv_set();
58int fluxstat_date_changed();
59void flux_connect_time();
60