| 123456789101112131415161718192021222324252627282930313233343536373839404142434445464748 |
- #include "includes.h"
- #include "device.h"
- #include "gateway.h"
- #include "net_proc.h"
- typedef struct _gb_gateway_info {
- gb_gateway_bind_info_t bind;
- u16 gw_echo_fail_count;
- u16 node_echo_fail_count[GB_SUPPORT_MAX_NODE];
- } gb_gateway_info_t;
- gb_gateway_info_t gw_mgr;
- int gateway_gw_id_flush(u32 gw_device_id)
- {
- int ret = 0;
- gw_mgr.bind.gw_device_id = gw_device_id;
- gw_mgr.gw_echo_fail_count = 0;
-
- return ret;
- }
-
- int gateway_id_cmp(u32 gw_device_id)
- {
- int ret = 0;
-
- if(gw_mgr.bind.gw_device_id == gw_device_id) {
- ret = 1;
- }
- return ret;
- }
- int gateway_gw_id_get(u32 *gw_device_id)
- {
- int ret = 0;
- if(gw_device_id) {
- *gw_device_id = gw_mgr.bind.gw_device_id;
- }
-
- if(gw_mgr.bind.gw_device_id) {
- ret = 1;
- }
-
- return ret;
- }
|