lh | 9ed821d | 2023-04-07 01:36:19 -0700 | [diff] [blame] | 1 | /** |
| 2 | * @file Mainctl_msg.h |
| 3 | * @brief ÌṩÖ÷¿Ø¡¢ÍøÂçÏà¹ØÏûÏ¢½Ó¿Ú |
| 4 | * |
| 5 | * Copyright (C) 2017 Sanechips Technology Co., Ltd. |
| 6 | * @author Linxu Gebin |
| 7 | * |
| 8 | * This program is free software; you can redistribute it and/or modify |
| 9 | * it under the terms of the GNU General Public License version 2 as |
| 10 | * published by the Free Software Foundation. |
| 11 | * |
| 12 | ************************************************************************ |
| 13 | */ |
| 14 | |
| 15 | #ifndef __MAINCTRL_MSG_H__ |
| 16 | #define __MAINCTRL_MSG_H__ |
| 17 | |
| 18 | #include "message.h" |
| 19 | |
| 20 | /** |
| 21 | * @brief ¶¨ÒåÖ÷¿ØÏûÏ¢ |
| 22 | * @param MSG_CMD_RESET_REQUEST »Ö¸´³ö³§ÉèÖÃÇëÇó |
| 23 | * @param MSG_CMD_POWEROFF_REQUEST ¹Ø»úÇëÇó |
| 24 | * @param MSG_CMD_RESTART_REQUEST ÖØÆôÇëÇó |
| 25 | * @param MSG_CMD_NET_IPPORT_FILTER ·À»ðǽ-¶Ë¿Ú¹ýÂËÏûÏ¢ |
| 26 | * @param MSG_CMD_NET_IPPORT_FORWARD ·À»ðǽ-¶Ë¿Úת·¢ÏûÏ¢ |
| 27 | * @param MSG_CMD_NET_DMZ ·À»ðǽ-DMZÏûÏ¢ |
| 28 | * @param MSG_CMD_NET_IPPORT_MAPPING ·À»ðǽ-¶Ë¿ÚÓ³ÉäÏûÏ¢ |
| 29 | * @param MSG_CMD_NET_UPNP ·À»ðǽ-UPNPÏûÏ¢ |
| 30 | * @param MSG_CMD_NET_URL_FILTER ·À»ðǽ-URL¹ýÂËÏûÏ¢ |
| 31 | * @param MSG_CMD_NET_MTU MTUÏà¹ØÅäÖÃÏûÏ¢ |
| 32 | * @param MSG_CMD_NET_STATIC_DHCP DHCPµØÖ·³ØÖеľ²Ì¬IPÏà¹ØÉèÖÃÏûÏ¢ |
| 33 | * @param MSG_CMD_NET_PLUGIN ÈȲå°ÎÉ豸²åÈëÏûÏ¢ |
| 34 | * @param MSG_CMD_NET_PLUGOUT ÈȲå°ÎÉ豸°Î³öÏûÏ¢ |
| 35 | * @param MSG_CMD_NET_CONNECT rj45ºÍwifiµÈÉ豸Á¬½ÓÍøÂçÏûÏ¢ |
| 36 | * @param MSG_CMD_NET_DISCON rj45ºÍwifiµÈÉ豸¶Ï¿ªÍøÂçÏûÏ¢ |
| 37 | * @param MSG_CMD_NET_PDP_ACT pdp¼¤»îÏûÏ¢ |
| 38 | * @param MSG_CMD_NET_PDP_DEACT pdpÈ¥¼¤»îÏûÏ¢ |
| 39 | * @param MSG_CMD_NET_TC_CTRL Á÷Á¿¿ØÖÆÏûÏ¢ |
| 40 | * @param MSG_CMD_NET_GET_HOSTNAME Ð޸ĽÓÈëÉ豸µÄhostnameÏûÏ¢ |
| 41 | * @param MSG_CMD_NET_BIND_STATIC_ADDRESS ¾²Ì¬µØÖ·°ó¶¨ÏûÏ¢ |
| 42 | * @param MSG_CMD_NET_BIND_STATIC_ADDRESS_ADD Ìí¼Ó¾²Ì¬µØÖ·°ó¶¨ÏûÏ¢ |
| 43 | * @param MSG_CMD_NET_BIND_STATIC_ADDRESS_DEL ɾ³ý¾²Ì¬µØÖ·°ó¶¨ÏûÏ¢ |
| 44 | * @param MSG_CMD_NET_PING_DIAGNOSTICS pingÕï¶Ï²Ù×÷ÏûÏ¢ |
| 45 | * @param MSG_CMD_NET_DHCP_SETTING_REQ DHCPÉèÖÃÇëÇóÏûÏ¢ |
| 46 | */ |
| 47 | #ifndef DOXYGEN_SHOULD_SKIP_THIS |
| 48 | /*Ö÷¿ØÏà¹ØÏûÏ¢ÃüÁî*/ |
| 49 | typedef enum { |
| 50 | /*Ö÷¿Ø¿ØÖÆÏà¹Ø*/ |
| 51 | MSG_CMD_MAINCTRL_BEG = MSG_CMD_MAINCTRL_BASE, |
| 52 | |
| 53 | /* Ö÷¿ØÊÕµ½ÇëÇóºó£¬Í¨ÖªÐèÒªµÄÄ£¿é×öÏàÓ¦²Ù×÷£¬ÊÕµ½µÄÄ£¿é±ØÐë»Ø¸´result |
| 54 | * Ö÷¿ØÊÕµ½ËùÓÐresultºóÔÙÖ´ÐÐ×îºóµÄ²Ù×÷(±£´æNV£¬ÖØÆô¡¢¹Ø»ú¡¢resetµÈ) |
| 55 | */ |
| 56 | MSG_CMD_RESET_REQUEST, /*ÇëÇó»Ö¸´³ö³§ÉèÖà 211D, ²ÎÊý:ÎÞ */ |
| 57 | MSG_CMD_POWEROFF_REQUEST, /*ÇëÇ󹨻ú211E, ²ÎÊý:ÎÞ */ |
| 58 | MSG_CMD_RESTART_REQUEST, /*ÇëÇóÖØÆô211F, ²ÎÊý:ÎÞ */ |
| 59 | MSG_CMD_RESET_NOTIFY, /*֪ͨ»Ö¸´³ö³§ÉèÖÃ2120, ²ÎÊý:ÎÞ, ´¦ÀíÄ£¿é±ØÐë»Ø¸´MSG_CMD_RESET_RSP */ |
| 60 | MSG_CMD_POWEROFF_NOTIFY, /*֪ͨ¹Ø»ú2121, ²ÎÊý:ÎÞ, ´¦ÀíÄ£¿é±ØÐë»Ø¸´MSG_CMD_POWEROFF_RSP */ |
| 61 | MSG_CMD_RESTART_NOTIFY, /*Í¨ÖªÖØÆô2122, ²ÎÊý:ÎÞ, ´¦ÀíÄ£¿é±ØÐë»Ø¸´MSG_CMD_RESTART_RSP */ |
| 62 | MSG_CMD_RESET_RSP, /*»Ö¸´³ö³§ÉèÖûظ´ÏûÏ¢, ²ÎÊý:ÎÞ */ |
| 63 | MSG_CMD_POWEROFF_RSP, /*¹Ø»úÉèÖýá¹û»Ø¸´ÏûÏ¢, ²ÎÊý:ÎÞ */ |
| 64 | MSG_CMD_RESTART_RSP, /*ÖØÆôÉèÖýá¹û»Ø¸´ÏûÏ¢, ²ÎÊý:ÎÞ */ |
| 65 | |
| 66 | //ÍøÂçÏà¹Ø |
| 67 | MSG_CMD_NET_IPPORT_FILTER, /*·À»ðǽ-¶Ë¿Ú¹ýÂË, ²ÎÊý:ÎÞ, ÐèÒª·¢ËÍǰÉèÖÃÏà¹ØNV, ¼ûNV±í */ |
| 68 | MSG_CMD_NET_IPPORT_FORWARD, /*·À»ðǽ-¶Ë¿Úת·¢, ²ÎÊý:ÎÞ, ÐèÒª·¢ËÍǰÉèÖÃÏà¹ØNV, ¼ûNV±í */ |
| 69 | MSG_CMD_NET_DMZ, /*·À»ðǽ-DMZ, ²ÎÊý:ÎÞ, ÐèÒª·¢ËÍǰÉèÖÃÏà¹ØNV, ¼ûNV±í */ |
| 70 | MSG_CMD_NET_IPPORT_MAPPING, /*·À»ðǽ-¶Ë¿ÚÓ³Éä, ²ÎÊý:ÎÞ, ÐèÒª·¢ËÍǰÉèÖÃÏà¹ØNV, ¼ûNV±í */ |
| 71 | MSG_CMD_NET_UPNP, /*upnp, ²ÎÊý:ÎÞ, ÐèÒª·¢ËÍǰÉèÖÃÏà¹ØNV, ¼ûNV±í */ |
| 72 | MSG_CMD_NET_URL_FILTER, /*·À»ðǽ-URL¹ýÂË, ²ÎÊý:ÎÞ, ÐèÒª·¢ËÍǰÉèÖÃÏà¹ØNV, ¼ûNV±í, ²»Ö§³ÖHTTPS */ |
| 73 | MSG_CMD_NET_MTU, /*MTUÏà¹ØÅäÖÃ, ²»´ø²ÎÊý£¬ÐèÒª·¢ËÍǰÉèÖÃNV mtuÖµ */ |
| 74 | MSG_CMD_NET_STATIC_DHCP, /*DHCPµØÖ·³ØÖеľ²Ì¬IPÏà¹ØÉèÖÃ, ²ÎÊý:ÎÞ, ÐèÒª·¢ËÍǰÉèÖÃÏà¹ØNV, ¼ûNV±í */ |
| 75 | MSG_CMD_NET_PLUGIN, /*ÈȲå°ÎÉ豸²åÈ룬¹©netdev_plugin_proc_byname/netdev_plugin_procʹÓà */ |
| 76 | MSG_CMD_NET_PLUGOUT, /*ÈȲå°ÎÉ豸°Î³ö£¬¹©netdev_plugout_proc_byname/netdev_plugout_procʹÓà */ |
| 77 | MSG_CMD_NET_CONNECT, /*rj45ºÍwifiµÈÉ豸Á¬½ÓÍøÂ磬¹©netdev_connect_internetʹÓà */ |
| 78 | MSG_CMD_NET_DISCON, /*rj45ºÍwifiµÈÉ豸¶Ï¿ªÍøÂ磬¹©netdev_disconnect_internetʹÓà */ |
| 79 | MSG_CMD_NET_PDP_ACT, /*pdp¼¤»î,¹©pdp_act_procʹÓà */ |
| 80 | MSG_CMD_NET_PDP_DEACT, /*pdpÈ¥¼¤»î,¹©pdp_deact_procʹÓà */ |
| 81 | MSG_CMD_NET_TC_CTRL, /*Á÷Á¿¿ØÖÆ,¹©tc_controlʹÓà */ |
| 82 | MSG_CMD_NET_GET_HOSTNAME, /*Ð޸ĽÓÈëÉ豸µÄhostname, ²ÎÊý:struct mac_hostname_info */ |
| 83 | MSG_CMD_NET_BIND_STATIC_ADDRESS, /*¾²Ì¬µØÖ·°ó¶¨, ²ÎÊý:ÎÞ ÐèÒª·¢ËÍǰÉèÖÃÏà¹ØNV, ¼ûNV±í */ |
| 84 | MSG_CMD_NET_BIND_STATIC_ADDRESS_ADD, /*Ìí¼Ó¾²Ì¬µØÖ·°ó¶¨, ²ÎÊý: struct static_macip_info */ |
| 85 | MSG_CMD_NET_BIND_STATIC_ADDRESS_DEL, /*ɾ³ý¾²Ì¬µØÖ·°ó¶¨, ²ÎÊý: macµØÖ· */ |
| 86 | MSG_CMD_NET_PING_DIAGNOSTICS, /*pingÕï¶Ï²Ù×÷, ²ÎÊý:ÎÞ, ÐèÒª·¢ËÍǰÉèÖÃÏà¹ØNV, ¼ûNV±í */ |
| 87 | |
| 88 | MSG_CMD_NET_DHCP_SETTING_REQ, /*ÍøÂçDHCP»ù´¡²ÎÊýÅäÖÃÇëÇó*/ |
| 89 | MSG_CMD_NET_DHCP_SETTING_RSP, /*ÍøÂçDHCP»ù´¡²ÎÊýÅäÖûظ´*/ |
| 90 | |
xf.li | bdd93d5 | 2023-05-12 07:10:14 -0700 | [diff] [blame] | 91 | #if (MODEM_TYPE == vehicle_dc) |
| 92 | MSG_CMD_NET_FIREWALL_ADD_REQ, /*ÅäÖ÷À»ðǽ£ºÖ¸¶¨IP²»ÔÊÐí·ÃÎÊÉ豸*/ |
| 93 | MSG_CMD_NET_FIREWALL_DEL_REQ, /*ɾ³ý·À»ðǽ£ºÖ¸¶¨IP²»ÔÊÐí·ÃÎÊÉ豸*/ |
| 94 | MSG_CMD_NET_FIREWALL_CLEANUP_REQ, /*Çå³þËùÓÐÒÑ·À»ðǽ£ºÖ¸¶¨IP²»ÔÊÐí·ÃÎÊÉ豸*/ |
| 95 | #endif |
| 96 | |
lh | 9ed821d | 2023-04-07 01:36:19 -0700 | [diff] [blame] | 97 | /* --------------------- ÒÔÏÂÊÇÄÚ²¿Ê¹ÓÃÏûÏ¢ ---------------- */ |
| 98 | MSG_CMD_NET_WAN4_CHANGE, /*ipv4ÍâÍø¿Ú·¢Éú±ä»¯, ²ÎÊý:ÎÞ */ |
| 99 | MSG_CMD_NET_WAN6_CHANGE, /*ipv6ÍâÍø¿Ú·¢Éú±ä»¯, ²ÎÊý:ÎÞ */ |
| 100 | MSG_CMD_NET_TIMER_DEL, /*ɾ³ý¶¨Ê±Æ÷²Ù×÷, ²ÎÊý:ÍâÍø¿ÚÀàÐÍethwan¡¢wifiwan */ |
| 101 | MSG_CMD_NET_TIMER_OUT, /*¶¨Ê±Æ÷³¬Ê±²Ù×÷, ²ÎÊý:É豸dev_ID */ |
| 102 | MSG_CMD_NET_SET_RJ45_LAN, /*½«rj45ÉèÖÃΪÄÚÍø¿Ú, ²ÎÊý:ÎÞ */ |
| 103 | MSG_CMD_NET_ADD_CHILDREN_DEVICE, /*¼Ò³¤Ä£Ê½¹¦ÄÜÖÐ, Ìí¼ÓÉ豸µ½¶ùͯ×éÉ豸, ²ÎÊý: struct mac_hostname_info*/ |
| 104 | MSG_CMD_NET_DEL_CHILDREN_DEVICE, /*¼Ò³¤Ä£Ê½¹¦ÄÜÖÐ, ɾ³ý¶ùͯ×éÉ豸, ²ÎÊý: macµØÖ· */ |
| 105 | MSG_CMD_NET_ADD_WHITE_SITE, /*¼Ò³¤Ä£Ê½¹¦ÄÜÖÐ, Ìí¼ÓÍøÕ¾µ½°×Ãûµ¥, ²ÎÊý: struct white_site_info */ |
| 106 | MSG_CMD_NET_REMOVE_WHITE_SITE, /*¼Ò³¤Ä£Ê½¹¦ÄÜÖÐ, ɾ³ý°×Ãûµ¥ÖеÄÍøÖ·, ²ÎÊý: °×Ãûµ¥ÍøÕ¾ */ |
| 107 | MSG_CMD_NET_START_NONET, /*¼Ò³¤Ä£Ê½¹¦ÄÜÖÐ, ½ûÖ¹ÉÏÍøÊ±¼ä¿ªÊ¼, ²ÎÊý:ÎÞ, ÐèÒª·¢ËÍǰÉèÖÃÏà¹ØNV, ¼ûNV±í */ |
| 108 | MSG_CMD_NET_STOP_NONET, /*¼Ò³¤Ä£Ê½¹¦ÄÜÖУ¬½ûÖ¹ÉÏÍøÊ±¼ä½áÊø, ²ÎÊý:ÎÞ, ÐèÒª·¢ËÍǰÉèÖÃÏà¹ØNV, ¼ûNV±í */ |
| 109 | MSG_CMD_NET_WAN_DIAL_FAIL, /*֪ͨÍâÍø¿ÚÁªÍø³¬Ê±, ²ÎÊý:ÎÞ */ |
| 110 | MSG_CMD_SECURITY_LOG_SAVE, /*°²È«ÈÕÖ¾´æ´¢, ²ÎÊý:ÈÕÖ¾×Ö·û´®s */ |
| 111 | } emMSG_CMD_MainCtrl; |
| 112 | #endif |
| 113 | |
| 114 | /** * @brief dhcp·þÎñÆ÷ÐÅÏ¢ |
| 115 | * @param lan_ip Íø¹Øip |
| 116 | * @param lan_netmask ÑÚÂë |
| 117 | * @param dhcp_enabled dhcp ·þÎñÆ÷ʹÄܱêÖ¾ |
| 118 | * @param dchp_start dhcp µØÖ·³ØÆðʼµØÖ· |
| 119 | * @param dchp_end dhcp µØÖ·³Ø½áÊøµØÖ· |
| 120 | * @param dchp_dns dnsµØÖ· |
| 121 | * @param dchp_lease dhcp×âÔ¼Îļþ |
| 122 | */ |
| 123 | typedef struct { |
| 124 | char lan_ip[SOFTAP_IP_MAX_LEN]; |
| 125 | char lan_netmask[SOFTAP_IP_MAX_LEN]; |
| 126 | int dhcp_enabled; |
| 127 | char dhcp_start[SOFTAP_IP_MAX_LEN]; |
| 128 | char dhcp_end[SOFTAP_IP_MAX_LEN]; |
| 129 | char dhcp_dns[SOFTAP_IP_MAX_LEN]; |
| 130 | char dhcp_lease[SOFTAP_STR_LEN_16]; |
| 131 | } dhcp_setting_req; |
| 132 | |
| 133 | /** * @brief restart request message info |
| 134 | * @param action restart or reset |
| 135 | * @param subactuon finally realized by MCU or mainCtrl |
| 136 | */ |
| 137 | typedef struct { |
| 138 | int action; |
| 139 | int subaction; |
| 140 | } restart_info; |
| 141 | |
| 142 | typedef enum { |
| 143 | Restart_Action_RESTART = 0, |
| 144 | Restart_Action_RESET, |
| 145 | } emACTION_RESTART_MainCtrl; |
| 146 | |
| 147 | typedef enum { |
| 148 | Operate_By_MCU = 0, |
| 149 | Operate_By_SOC, |
| 150 | } emSUBACTION_RESTART_MainCtrl; |
| 151 | |
| 152 | |
| 153 | #endif |