lh | 9ed821d | 2023-04-07 01:36:19 -0700 | [diff] [blame] | 1 | /************************************************************************ |
| 2 | * °æÈ¨ËùÓÐ (C)2010, ÉîÛÚÊÐÖÐÐËͨѶ¹É·ÝÓÐÏÞ¹«Ë¾¡£ |
| 3 | * |
| 4 | * ÎļþÃû³Æ£º zte_web_mgmt.h |
| 5 | * Îļþ±êʶ£º |
| 6 | * ÄÚÈÝÕªÒª£º |
| 7 | * ÆäËü˵Ã÷£º |
| 8 | * µ±Ç°°æ±¾£º V0.1 |
| 9 | * ×÷ Õߣº zyt |
| 10 | * Íê³ÉÈÕÆÚ£º 2010-11-24 |
| 11 | * |
| 12 | * Ð޸ļǼ1£º |
| 13 | * ÐÞ¸ÄÄÚÈÝ£º³õʼ°æ±¾ |
| 14 | ************************************************************************/ |
| 15 | |
| 16 | #ifndef ZTE_WEB_MGMT_H |
| 17 | #define ZTE_WEB_MGMT_H |
| 18 | |
| 19 | #define APNCONFIG_MEMORY 1024 |
| 20 | #define PROFILE_MEMBER_LEN 32 |
| 21 | #define PROFILE_APN_LEN 65 |
| 22 | #define PROFILE_APN_AES_LEN 129 |
| 23 | #define DAYSEC 86400 |
| 24 | #define COMMONYEARSEC 31536000 |
| 25 | #define LEAPYEARSEC 31622400 |
| 26 | #define JAN_2000 946684791 |
| 27 | typedef struct tag_APN_PROFILE { |
| 28 | char profile_name[PROFILE_MEMBER_LEN]; |
| 29 | char apn_name[PROFILE_APN_LEN]; |
| 30 | char apn_select[PROFILE_MEMBER_LEN]; |
| 31 | char dial_num[PROFILE_MEMBER_LEN]; |
| 32 | char ppp_auth_mode[PROFILE_MEMBER_LEN]; |
| 33 | char ppp_username[PROFILE_APN_LEN]; |
| 34 | char ppp_passwd[PROFILE_APN_LEN]; |
| 35 | char pdp_type[PROFILE_MEMBER_LEN]; |
| 36 | char pdp_select[PROFILE_MEMBER_LEN]; |
| 37 | char pdp_addr[PROFILE_MEMBER_LEN]; |
| 38 | char dns_mode[PROFILE_MEMBER_LEN]; |
| 39 | char prefer_dns_manual[PROFILE_MEMBER_LEN]; |
| 40 | char standby_dns_manual[PROFILE_MEMBER_LEN]; |
| 41 | } APN_PROFILE; |
| 42 | |
| 43 | |
| 44 | typedef struct tag_IPv6_APN_PROFILE { |
| 45 | char profile_name[PROFILE_MEMBER_LEN]; |
| 46 | char apn_name[PROFILE_APN_LEN]; |
| 47 | char apn_select[PROFILE_MEMBER_LEN]; |
| 48 | char dial_num[PROFILE_MEMBER_LEN]; |
| 49 | char ppp_auth_mode[PROFILE_MEMBER_LEN]; |
| 50 | char ppp_username[PROFILE_APN_LEN]; |
| 51 | char ppp_passwd[PROFILE_APN_LEN]; |
| 52 | char pdp_type[PROFILE_MEMBER_LEN]; |
| 53 | char pdp_select[PROFILE_MEMBER_LEN]; |
| 54 | char pdp_addr[PROFILE_MEMBER_LEN]; |
| 55 | char dns_mode[PROFILE_MEMBER_LEN]; |
| 56 | char prefer_dns_manual[PROFILE_MEMBER_LEN]; |
| 57 | char standby_dns_manual[PROFILE_MEMBER_LEN]; |
| 58 | } IPV6_APN_PROFILE; |
| 59 | |
| 60 | |
| 61 | /* management */ |
| 62 | extern void zte_mgmt_login(webs_t wp);//11 |
| 63 | extern void zte_mgmt_logout(webs_t wp);//11 |
| 64 | extern void zte_mgmt_set_language(webs_t wp);//11 |
| 65 | extern void zte_mgmt_restore(webs_t wp);//11 |
| 66 | extern void zte_mgmt_poweroff(webs_t wp); |
| 67 | extern void zte_mgmt_control_power_on_speed(webs_t wp); |
| 68 | extern void zte_mgmt_change_password(webs_t wp);//11 |
| 69 | extern void zte_mgmt_change_account(webs_t wp);// |
| 70 | extern void zte_goform_mgmt_set_not_login_process(webs_t wp); |
| 71 | extern void zte_mgmt_disable_pin(webs_t wp);//11 |
| 72 | extern void zte_mgmt_pin_input(webs_t wp);//11 |
| 73 | extern void zte_mgmt_puk_input(webs_t wp);//11 |
| 74 | extern void zte_mgmt_auto_pin(webs_t wp); |
| 75 | extern void zte_mgmt_pin_enable_or_modify(webs_t wp);//11 |
| 76 | extern void zte_mgmt_unlock_network(webs_t wp);//11 |
| 77 | extern void zte_goform_mgmt_pin_mgmt_process(webs_t wp); |
| 78 | extern void zte_quick_setup(webs_t wp);//11 |
| 79 | //extern void zte_quick_set_first(webs_t wp);//11 |
| 80 | void deal_quick_setup_apn_ex(webs_t wp); |
| 81 | extern void zte_mgmt_set_devicemode(webs_t wp); |
| 82 | |
| 83 | |
| 84 | |
| 85 | extern void zte_goform_mgmt_sntp_process(webs_t wp); |
| 86 | |
| 87 | |
| 88 | extern void zte_goform_mgmt_reboot_process(webs_t wp); |
| 89 | extern void zte_goform_mgmt_syslog_process(webs_t wp); |
| 90 | |
| 91 | extern void get_autoapn_profile(APN_PROFILE *apn_profile); |
| 92 | extern void get_apn_profile_by_index(int index, APN_PROFILE *profile); |
| 93 | extern void get_ipv6apn_profile_by_index(int index, IPV6_APN_PROFILE *ipv6profile); |
| 94 | extern void get_ipv4v6apn_profile_by_index(int index, APN_PROFILE *profile, IPV6_APN_PROFILE *ipv6profile); |
| 95 | extern void get_autoapn_profile(APN_PROFILE *profile); |
| 96 | extern void set_apn_profile_by_index(int index, APN_PROFILE *profile); |
| 97 | extern void set_ipv6_apn_profile_by_index(int index, IPV6_APN_PROFILE *ipv6profile); |
| 98 | extern void set_ipv4v6_apn_profile_by_index(int index, APN_PROFILE *profile, IPV6_APN_PROFILE *ipv6profile); |
| 99 | extern void set_apn_prof_aes_by_index(int index, APN_PROFILE *profile); |
| 100 | extern void set_ipv6_apn_prof_aes_by_index(int index, IPV6_APN_PROFILE *profile); |
| 101 | extern void set_ipv4v6_apn_prof_aes_by_index(int index, APN_PROFILE *profile, IPV6_APN_PROFILE *ipv6profile); |
| 102 | extern int apn_encrypt_code(void); |
| 103 | extern int ipv6apn_encrypt_code(void); |
| 104 | |
| 105 | extern void zte_wan_lock_frequency_process(webs_t wp); |
| 106 | |
| 107 | extern int manual_set_time(); |
| 108 | |
| 109 | extern void getdialog_url(int eid, webs_t wp, int argc, char_t **argv); |
| 110 | extern void getddns_status(int eid, webs_t wp, int argc, char_t **argv); |
| 111 | extern char * timei2s(int); |
| 112 | extern void timeen2ch(char *); |
| 113 | extern void datastatic(char *, char *, char *, char *, char *); |
| 114 | |
| 115 | extern int zte_fota_notifyPushMsg(int cmd); |
| 116 | |
| 117 | extern void zte_fota_get_upgrade_result(webs_t wp); |
| 118 | extern void zte_fota_get_dp_pack_info(webs_t wp); |
| 119 | extern void zte_fota_get_update_info(webs_t wp); |
| 120 | //extern void zte_fota_get_dm_last_check_time(webs_t wp); |
| 121 | #ifdef WEBS_SECURITY |
| 122 | extern char *js_aes_decode(char *src, size_t len, size_t *out_len); |
| 123 | #endif |
| 124 | #endif |
| 125 | |