码迷,mamicode.com
首页 > 其他好文 > 详细

ac与ap同步分析

时间:2017-12-13 23:55:18      阅读:221      评论:0      收藏:0      [点我收藏+]

标签:count   gen   users   connect   ica   reg   tcp协议   encode   building   

1 ApStatusRequest : ap请求

网关上抓包 : tcpdump -ni br-lan tcp port 8090    -w portal.pcap   tcp协议 端口8090 可以分析

ApStatusRequest:new(cjson.decode(json))数据解压 创建对象    

http://192.168.156.1:8090/wacs-mana/status.ac

User-Agent: ac 1.0.0
Host: 192.168.156.1:8090
Content-Type: application/x-www-form-urlencoded
Connection: Keep-Alive
Content-Length: 2099

{

  • "gw_id": "28450FE01F32",         // SN 
  • "vendor_id": "ZK",
  • "device_type": "S826D0",
  • "product_type": "WAP5230",
  • "fm_name": "ZK-WAP5230-WAP5120-4.3.0.2468-DEV",
  • "soft_ver": "4.3.0.2468",
  • "sys_load": 100,
  • "status_interval": 2,
  • "station_agingtime": 10,
  • "timer_reboot": 0,
  • "ipaddr_release": 5,
  • "auth_server": "10.10.10.248",
  • "auth_path": "/",
  • "auth_port": 8080,
  • "ac_server": "auth.zkgcloud.com",
  • "ac_path": "/wacs-mana/",
  • "ac_port": 8090,
  • "ac_name": "2",
  • "ac_outer_ip": "2",
  • "ac_bak_hostname": "auth.zkgcloud.com",
  • "ac_bak_path": "/wacs-mana/",
  • "ac_bak_port": 8090,
  • "ac_bak_sync_interval": 30,
  • "acdisc_enable": 1,
  • "auth_enable": 1,
  • "apple_auto_portal": 0,
  • "escape_mode_enable": 0,
  • "auth_protocol": "cmcc-portal",
  • "nas_ip": "1",
  • "nas_id": "2",
  • "sys_time": 1743,
  • "sys_memory": 128692224,
  • "sys_memfree": 64143360,
  • "work_mode": 0,
  • "lan_ip": "192.168.2.1",
  • "wan_type": 1,
  • "wan_mac": "24:05:0f:e0:1f:35",
  • "wan_ip": "192.168.156.138",
  • "lan_mac": "24:05:0F:E0:1F:34",
  • "kick_threshold": -85,
  • "band_select_enable": 1,
  • "total_users": 0,
  • -
    "radio24g": {
    • "channel": 0,
    • "turn_on": 1,
    • "freq_bandwidth": 1,
    • "wireless_mode": 0,
    • "tx_power": 27
    },
  • -
    "radio5g": {
    • "channel": 0,
    • "turn_on": 1,
    • "freq_bandwidth": 2,
    • "wireless_mode": 2,
    • "tx_power": 23
    },
  • -
    "ssids": [
    • -
      {
      • "ssid": "zkliulin89898",
      • "vlanEnable": 0,
      • "vlanId": 0,
      • "bssid": "24:05:0f:e0:1f:36",
      • "auth_mode": 0,
      • "encryption_type": 0,
      • "password": "",
      • "coding_type": 0,
      • "hide_ssid": 0,
      • "max_users": -1,
      • "download_speed": -1,
      • "upload_speed": -1,
      • "station_count": 0,
      • "station_list": [ ],
      • "auth_enable": 1
      }
    ],
  • -
    "ssids_5g": [
    • -
      {
      • "ssid": "zk_5g",
      • "vlanEnable": 0,
      • "vlanId": 0,
      • "bssid": "24:05:0f:e0:1f:36",
      • "auth_mode": 0,
      • "encryption_type": 0,
      • "password": "",
      • "coding_type": 0,
      • "hide_ssid": 0,
      • "max_users": -1,
      • "download_speed": -1,
      • "upload_speed": -1,
      • "station_count": 0,
      • "station_list": [ ],
      • "auth_enable": 1
      }
    ],
  • -
    "qos": {
    • "enable": 0,
    • "upload_bw": 128,
    • "download_bw": 51200
    },
  • -
    "sta_scan": {
    • "enable": 0,
    • "building_id": "ZK-PROBE-001002",
    • "interval": 5,
    • "server_ip": "120.76.116.73",
    • "server_port": 8100
    },
  • -
    "mac_white_black": {
    • "mac_black_list_md5": "0",
    • "mac_white_list_md5": "0"
    }

}

if useEnable == "1" and useReg == "1" and wacSn ~= devSn then  自动注册判断

DBHelper.count("nas_device", {["device_sn = "] = deviceSN}) 数据库查询 找到了就是已经添加的数据

DBHelper.insert("nas_device", saveData) 插入到数据库

local apPara = acMaintService.statusToConfig(apStatusRequest);  参数问题

ac与ap同步分析

标签:count   gen   users   connect   ica   reg   tcp协议   encode   building   

原文地址:http://www.cnblogs.com/xiaohuamao/p/8034298.html

(0)
(0)
   
举报
评论 一句话评论(0
登录后才能评论!
© 2014 mamicode.com 版权所有  联系我们:gaon5@hotmail.com
迷上了代码!