make
"make -C modules/arp_scanner MODULE_NAME=arp_scanner"
make[4]: Entering directory '/home/fuyu1/code/Platform_NVMP/nvmp/build_dir/target-arm-ca9-linux-uclibcgnueabihf-cx20iv1.20/nsd/modules/arp_scanner'
arm-ca9-linux-uclibcgnueabihf-gcc -O2 -pipe -fgnu89-inline -march=armv7-a -mtune=cortex-a9 -mfpu=neon -mfloat-abi=hard -ftree-vectorize -fno-builtin -fno-common -g -Wno-stringop-truncation -Wno-format-truncation -Wno-sizeof-pointer-div -Wno-stringop-overflow -Wno-format-overflow -Wno-sizeof-pointer-memaccess -I/home/fuyu1/code/Platform_NVMP/nvmp/staging_dir/target-arm-ca9-linux-uclibcgnueabihf-cx20iv1.20/usr/lib/libiconv-full/include -I/home/fuyu1/code/Platform_NVMP/nvmp/staging_dir/target-arm-ca9-linux-uclibcgnueabihf-cx20iv1.20/usr/lib/libintl-full/include -DCONFIG_STATISTIC_REPORT_DOMAIN=n-da.tplinkcloud.com.cn -Wno-sizeof-pointer-div -Wno-restrict -Wno-format-truncation -Wno-format-overflow -Wno-stringop-truncation -DSUPPORT_PLUGIN -DCONFIG_MSG_PUSH_POST_URL=/surveillance/v1/reportMsg -DCONFIG_NTP_HOSTNAME=n-tss.tplinkcloud.com.cn -DUP_FIRMWARE_LIMIT_SIZE=16777216 -DSENSITIVITY_INT -DMAKEROOM_BEFORE_UPGRADE -DAUDIO_ENABLE -DCONFIG_TP_TAPO_MAP_ROOTFS -DTP_VIGI -I/home/fuyu1/code/Platform_NVMP/nvmp/staging_dir/target-arm-ca9-linux-uclibcgnueabihf-cx20iv1.20/usr/include -I/home/fuyu1/code/Platform_NVMP/nvmp/staging_dir/target-arm-ca9-linux-uclibcgnueabihf-cx20iv1.20/include -I/home/fuyu1/code/Platform_NVMP/nvmp/../sdk/soc/nvt9856x/uclibc-toolchain-1.0.32/arm-ca9-linux-uclibcgnueabihf-8.4.01/arm-ca9-linux-uclibcgnueabihf/sysroot/usr/include -I/home/fuyu1/code/Platform_NVMP/nvmp/staging_dir/target-arm-ca9-linux-uclibcgnueabihf-cx20iv1.20/usr/lib/libiconv-full/include -I/home/fuyu1/code/Platform_NVMP/nvmp/staging_dir/target-arm-ca9-linux-uclibcgnueabihf-cx20iv1.20/usr/lib/libintl-full/include -Wall -Werror -ffunction-sections -fdata-sections -DMODULE_LIST="\"tdpd tmpd mactool nifc ipcd dhcpc diagnose httpd tpntp system upgrade arp_scanner\"" -I/home/fuyu1/code/Platform_NVMP/nvmp/build_dir/target-arm-ca9-linux-uclibcgnueabihf-cx20iv1.20/nsd/include -I/home/fuyu1/code/Platform_NVMP/nvmp/build_dir/target-arm-ca9-linux-uclibcgnueabihf-cx20iv1.20/nsd/common -I/home/fuyu1/code/Platform_NVMP/nvmp/build_dir/target-arm-ca9-linux-uclibcgnueabihf-cx20iv1.20/nsd/common/ds -I/home/fuyu1/code/Platform_NVMP/nvmp/build_dir/target-arm-ca9-linux-uclibcgnueabihf-cx20iv1.20/nsd/modules/mactool -I./libXml -I./libutils -I./libmediautil -I../../include -c -o arp_scan.o arp_scan.c
In file included from arp_scan.c:13:
arp_scan.h:60:6: error: expected ';' before 'int'
LOCAL int arp_scan_init();
^~~~
;
arp_scan.h:61:6: error: expected ';' before 'int'
LOCAL int arp_scan_check();
^~~~
;
arp_scan.h:62:6: error: expected ';' before 'int'
LOCAL int arp_scan_start();
^~~~
;
arp_scan.h:63:6: error: expected ';' before 'int'
LOCAL int arp_scan_reload(DS_MSG *msg);
^~~~
;
arp_scan.h:63:27: error: unknown type name 'DS_MSG'
LOCAL int arp_scan_reload(DS_MSG *msg);
^~~~~~
arp_scan.h:64:6: error: expected ';' before 'void'
LOCAL void arp_scan_main();
^~~~~
;
arp_scan.c: In function 'arp_scan':
arp_scan.h:21:24: error: expected expression before '{' token
#define BROADCAST_ADDR {0xff, 0xff, 0xff, 0xff, 0xff, 0xff}
^
arp_scan.c:118:45: note: in expansion of macro 'BROADCAST_ADDR'
memcpy(eth_header->ether_dhost, BROADCAST_ADDR, ETH_ALEN);
^~~~~~~~~~~~~~
arp_scan.c:118:13: error: too few arguments to function 'memcpy'
memcpy(eth_header->ether_dhost, BROADCAST_ADDR, ETH_ALEN);
^~~~~~
In file included from arp_scan.c:3:
/home/fuyu1/code/Platform_NVMP/sdk/soc/nvt9856x/uclibc-toolchain-1.0.32/arm-ca9-linux-uclibcgnueabihf-8.4.01/arm-ca9-linux-uclibcgnueabihf/sysroot/usr/include/string.h:37:14: note: declared here
extern void *memcpy (void *__restrict __dest,
^~~~~~
arp_scan.c: At top level:
arp_scan.c:138:11: error: static declaration of 'arp_scan_init' follows non-static declaration
LOCAL int arp_scan_init()
^~~~~~~~~~~~~
In file included from arp_scan.c:13:
arp_scan.h:60:11: note: previous declaration of 'arp_scan_init' was here
LOCAL int arp_scan_init();
^~~~~~~~~~~~~
arp_scan.c: In function 'arp_scan_init':
arp_scan.c:140:14: error: implicit declaration of function 'ds_read'; did you mean 'pread'? [-Werror=implicit-function-declaration]
if (0 == ds_read(ARP_DATA_PATH, &arp_config_t, sizeof(arp_config_t)))
^~~~~~~
pread
arp_scan.c:140:22: error: 'ARP_DATA_PATH' undeclared (first use in this function)
if (0 == ds_read(ARP_DATA_PATH, &arp_config_t, sizeof(arp_config_t)))
^~~~~~~~~~~~~
arp_scan.c:140:22: note: each undeclared identifier is reported only once for each function it appears in
arp_scan.c:140:38: error: expected expression before 'arp_config_t'
if (0 == ds_read(ARP_DATA_PATH, &arp_config_t, sizeof(arp_config_t)))
^~~~~~~~~~~~
arp_scan.c:142:16: error: 'SLP_ESYSTEM' undeclared (first use in this function)
return SLP_ESYSTEM;
^~~~~~~~~~~
arp_scan.c:146:10: error: 'sockfd' undeclared (first use in this function); did you mean 'socket'?
if ((sockfd = socket(AF_PACKET, SOCK_RAW | SOCK_NONBLOCK, htons(ETH_P_ARP))) < 0)
^~~~~~
socket
arp_scan.c:149:16: error: 'ERROR' undeclared (first use in this function); did you mean 'SO_ERROR'?
return ERROR;
^~~~~
SO_ERROR
arp_scan.c:153:5: error: unknown type name 'U8'
U8 table_len = arp_config_t.end_ip[3] - arp_config_t.start_ip[3] + 1;
^~
arp_scan.c:153:20: error: expected expression before 'arp_config_t'
U8 table_len = arp_config_t.end_ip[3] - arp_config_t.start_ip[3] + 1;
^~~~~~~~~~~~
arp_scan.c:154:5: error: 'ip_mac_table' undeclared (first use in this function)
ip_mac_table = (ARP_IPMAC_TABLE *)malloc(sizeof(ARP_IPMAC_TABLE) * table_len);
^~~~~~~~~~~~
arp_scan.c:154:21: error: 'ARP_IPMAC_TABLE' undeclared (first use in this function)
ip_mac_table = (ARP_IPMAC_TABLE *)malloc(sizeof(ARP_IPMAC_TABLE) * table_len);
^~~~~~~~~~~~~~~
arp_scan.c:154:38: error: expected expression before ')' token
ip_mac_table = (ARP_IPMAC_TABLE *)malloc(sizeof(ARP_IPMAC_TABLE) * table_len);
^
arp_scan.c:156:5: error: implicit declaration of function 'gettimeofday' [-Werror=implicit-function-declaration]
gettimeofday(&cur_time, NULL);
^~~~~~~~~~~~
arp_scan.c:163:5: error: implicit declaration of function 'msg_attach_handler' [-Werror=implicit-function-declaration]
msg_attach_handler(MSGID_DMS_CMD, arp_call_handle);
^~~~~~~~~~~~~~~~~~
arp_scan.c:163:24: error: 'MSGID_DMS_CMD' undeclared (first use in this function)
msg_attach_handler(MSGID_DMS_CMD, arp_call_handle);
^~~~~~~~~~~~~
arp_scan.c:163:39: error: 'arp_call_handle' undeclared (first use in this function)
msg_attach_handler(MSGID_DMS_CMD, arp_call_handle);
^~~~~~~~~~~~~~~
arp_scan.c:165:12: error: 'OK' undeclared (first use in this function)
return OK;
^~
arp_scan.c: At top level:
arp_scan.c:168:11: error: static declaration of 'arp_scan_check' follows non-static declaration
LOCAL int arp_scan_check()
^~~~~~~~~~~~~~
In file included from arp_scan.c:13:
arp_scan.h:61:11: note: previous declaration of 'arp_scan_check' was here
LOCAL int arp_scan_check();
^~~~~~~~~~~~~~
arp_scan.c: In function 'arp_scan_check':
arp_scan.c:170:9: error: expected expression before 'arp_config_t'
if (arp_config_t.end_ip[2] != sender_ip[2] || arp_config_t.start_ip[2] != sender_ip[2] ||
^~~~~~~~~~~~
arp_scan.c:173:9: error: implicit declaration of function 'ARP_DEBUG'; did you mean 'SO_DEBUG'? [-Werror=implicit-function-declaration]
ARP_DEBUG("Invalid IP address range, please check.\n");
^~~~~~~~~
SO_DEBUG
arp_scan.c:174:16: error: 'ERROR' undeclared (first use in this function); did you mean 'SO_ERROR'?
return ERROR;
^~~~~
SO_ERROR
arp_scan.c:176:12: error: 'OK' undeclared (first use in this function)
return OK;
^~
arp_scan.c: At top level:
arp_scan.c:179:11: error: static declaration of 'arp_scan_start' follows non-static declaration
LOCAL int arp_scan_start()
^~~~~~~~~~~~~~
In file included from arp_scan.c:13:
arp_scan.h:62:11: note: previous declaration of 'arp_scan_start' was here
LOCAL int arp_scan_start();
^~~~~~~~~~~~~~
arp_scan.c: In function 'arp_scan_start':
arp_scan.c:182:21: error: 'time_tid' undeclared (first use in this function); did you mean 'time_t'?
pthread_create(&time_tid, NULL, check_table_renew_time, NULL);
^~~~~~~~
time_t
arp_scan.c:182:37: error: 'check_table_renew_time' undeclared (first use in this function)
pthread_create(&time_tid, NULL, check_table_renew_time, NULL);
^~~~~~~~~~~~~~~~~~~~~~
arp_scan.c:186:12: error: 'scanning_flag' undeclared (first use in this function)
while (scanning_flag)
^~~~~~~~~~~~~
arp_scan.c:188:9: error: implicit declaration of function 'scan_once' [-Werror=implicit-function-declaration]
scan_once();
^~~~~~~~~
arp_scan.c:189:16: error: 'arpco' undeclared (first use in this function); did you mean 'arp_op'?
usleep(arpco.scan_interval);
^~~~~
arp_op
arp_scan.c:191:12: error: 'OK' undeclared (first use in this function)
return OK;
^~
arp_scan.c: At top level:
arp_scan.c:194:27: error: unknown type name 'DS_MSG'
LOCAL int arp_scan_reload(DS_MSG *msg)
^~~~~~
arp_scan.c:249:12: error: static declaration of 'arp_scan_main' follows non-static declaration
LOCAL void arp_scan_main()
^~~~~~~~~~~~~
In file included from arp_scan.c:13:
arp_scan.h:64:12: note: previous declaration of 'arp_scan_main' was here
LOCAL void arp_scan_main();
^~~~~~~~~~~~~
arp_scan.c: In function 'arp_scan_main':
arp_scan.c:251:5: error: unknown type name 'DS_OPT_DESC'
DS_OPT_DESC main_options[] =
^~~~~~~~~~~
arp_scan.c:253:13: error: implicit declaration of function 'DS_SWITCH_OPT' [-Werror=implicit-function-declaration]
DS_SWITCH_OPT(arp_config_t, enabled, OPT_FLAG_NORM),
^~~~~~~~~~~~~
arp_scan.c:253:27: error: expected expression before 'arp_config_t'
DS_SWITCH_OPT(arp_config_t, enabled, OPT_FLAG_NORM),
^~~~~~~~~~~~
arp_scan.c:254:13: error: implicit declaration of function 'DS_STR_OPT'; did you mean 'N_STRIP'? [-Werror=implicit-function-declaration]
DS_STR_OPT(arp_config_t, start_ip, OPT_FLAG_NORM),
^~~~~~~~~~
N_STRIP
arp_scan.c:254:24: error: expected expression before 'arp_config_t'
DS_STR_OPT(arp_config_t, start_ip, OPT_FLAG_NORM),
^~~~~~~~~~~~
arp_scan.c:255:24: error: expected expression before 'arp_config_t'
DS_STR_OPT(arp_config_t, end_ip, OPT_FLAG_NORM),
^~~~~~~~~~~~
arp_scan.c:256:13: error: implicit declaration of function 'DS_S32_OPT' [-Werror=implicit-function-declaration]
DS_S32_OPT(arp_config_t, scan_interval, OPT_FLAG_NORM),
^~~~~~~~~~
arp_scan.c:256:24: error: expected expression before 'arp_config_t'
DS_S32_OPT(arp_config_t, scan_interval, OPT_FLAG_NORM),
^~~~~~~~~~~~
arp_scan.c:257:24: error: expected expression before 'arp_config_t'
DS_S32_OPT(arp_config_t, packet_interval, OPT_FLAG_NORM),
^~~~~~~~~~~~
arp_scan.c:258:24: error: expected expression before 'arp_config_t'
DS_S32_OPT(arp_config_t, entry_lifetime, OPT_FLAG_NORM),
^~~~~~~~~~~~
arp_scan.c:261:5: error: unknown type name 'DS_SEG_DESC'
DS_SEG_DESC main_segments[] =
^~~~~~~~~~~
arp_scan.c:263:13: error: implicit declaration of function 'DS_STRUCT_SEG' [-Werror=implicit-function-declaration]
DS_STRUCT_SEG("config", SEG_LIM_RW, SEG_GROUP_ROOT, arp_config_t, main_options),
^~~~~~~~~~~~~
arp_scan.c:263:37: error: 'SEG_LIM_RW' undeclared (first use in this function)
DS_STRUCT_SEG("config", SEG_LIM_RW, SEG_GROUP_ROOT, arp_config_t, main_options),
^~~~~~~~~~
arp_scan.c:263:49: error: 'SEG_GROUP_ROOT' undeclared (first use in this function)
DS_STRUCT_SEG("config", SEG_LIM_RW, SEG_GROUP_ROOT, arp_config_t, main_options),
^~~~~~~~~~~~~~
arp_scan.c:263:65: error: expected expression before 'arp_config_t'
DS_STRUCT_SEG("config", SEG_LIM_RW, SEG_GROUP_ROOT, arp_config_t, main_options),
^~~~~~~~~~~~
arp_scan.c:266:5: error: unknown type name 'DS_SECT_DESC'
DS_SECT_DESC arp_scan_sections[] =
^~~~~~~~~~~~
arp_scan.c:268:13: error: implicit declaration of function 'DS_STRUCT_SECT' [-Werror=implicit-function-declaration]
DS_STRUCT_SECT("config", main_segments),
^~~~~~~~~~~~~~
arp_scan.c:271:5: error: unknown type name 'DS_TBL_DESC'
DS_TBL_DESC arp_scan_tables[] =
^~~~~~~~~~~
arp_scan.c:273:13: error: implicit declaration of function 'DS_STRUCT_TBL' [-Werror=implicit-function-declaration]
DS_STRUCT_TBL("arp_scan", TBL_ATTR_STC, arp_scan_sections),
^~~~~~~~~~~~~
arp_scan.c:273:39: error: 'TBL_ATTR_STC' undeclared (first use in this function)
DS_STRUCT_TBL("arp_scan", TBL_ATTR_STC, arp_scan_sections),
^~~~~~~~~~~~
arp_scan.c:275:5: error: unknown type name 'DS_DAT_MON_DESC'
DS_DAT_MON_DESC arp_data_monitor[] =
^~~~~~~~~~~~~~~
arp_scan.c:277:13: error: implicit declaration of function 'DS_DAT_MON'; did you mean 'SHRT_MIN'? [-Werror=implicit-function-declaration]
DS_DAT_MON(ARP_DATA_PATH, DATA_ATTRI_NOTIFY),
^~~~~~~~~~
SHRT_MIN
arp_scan.c:277:24: error: 'ARP_DATA_PATH' undeclared (first use in this function)
DS_DAT_MON(ARP_DATA_PATH, DATA_ATTRI_NOTIFY),
^~~~~~~~~~~~~
arp_scan.c:277:39: error: 'DATA_ATTRI_NOTIFY' undeclared (first use in this function)
DS_DAT_MON(ARP_DATA_PATH, DATA_ATTRI_NOTIFY),
^~~~~~~~~~~~~~~~~
arp_scan.c:280:5: error: unknown type name 'DS_MOD_DESC'
DS_MOD_DESC arp_scan_module = DS_STRUCT_MOD("arp_scan", arp_scan_init, arp_scan_check, arp_scan_reload, arp_scan_start,
^~~~~~~~~~~
arp_scan.c:280:35: error: implicit declaration of function 'DS_STRUCT_MOD' [-Werror=implicit-function-declaration]
DS_MOD_DESC arp_scan_module = DS_STRUCT_MOD("arp_scan", arp_scan_init, arp_scan_check, arp_scan_reload, arp_scan_start,
^~~~~~~~~~~~~
arp_scan.c:280:92: error: 'arp_scan_reload' undeclared (first use in this function); did you mean 'arp_scan_module'?
DS_MOD_DESC arp_scan_module = DS_STRUCT_MOD("arp_scan", arp_scan_init, arp_scan_check, arp_scan_reload, arp_scan_start,
^~~~~~~~~~~~~~~
arp_scan_module
arp_scan.c:283:5: error: unknown type name 'MODULE'
MODULE *module_node = ds_register_module("arp_scan", &arp_module);
^~~~~~
arp_scan.c:283:27: error: implicit declaration of function 'ds_register_module' [-Werror=implicit-function-declaration]
MODULE *module_node = ds_register_module("arp_scan", &arp_module);
^~~~~~~~~~~~~~~~~~
arp_scan.c:283:59: error: 'arp_module' undeclared (first use in this function); did you mean 'arp_scan_module'?
MODULE *module_node = ds_register_module("arp_scan", &arp_module);
^~~~~~~~~~
arp_scan_module
arp_scan.c:283:27: error: initialization of 'int *' from 'int' makes pointer from integer without a cast [-Werror=int-conversion]
MODULE *module_node = ds_register_module("arp_scan", &arp_module);
^~~~~~~~~~~~~~~~~~
arp_scan.c:284:5: error: implicit declaration of function 'NSD_ASSERT'; did you mean 'FD_ISSET'? [-Werror=implicit-function-declaration]
NSD_ASSERT(NULL != module_node);
^~~~~~~~~~
FD_ISSET
arp_scan.c:280:17: error: unused variable 'arp_scan_module' [-Werror=unused-variable]
DS_MOD_DESC arp_scan_module = DS_STRUCT_MOD("arp_scan", arp_scan_init, arp_scan_check, arp_scan_reload, arp_scan_start,
^~~~~~~~~~~~~~~
arp_scan.c:251:17: error: unused variable 'main_options' [-Werror=unused-variable]
DS_OPT_DESC main_options[] =
^~~~~~~~~~~~
arp_scan.c: At top level:
arp_scan.c:286:1: error: data definition has no type or storage class [-Werror]
NSD_INIT(arp_scan_main);
^~~~~~~~
arp_scan.c:286:1: error: type defaults to 'int' in declaration of 'NSD_INIT' [-Werror=implicit-int]
arp_scan.c:286:1: error: parameter names (without types) in function declaration [-Werror]
arp_scan.c:249:12: error: 'arp_scan_main' defined but not used [-Werror=unused-function]
LOCAL void arp_scan_main()
^~~~~~~~~~~~~