260922_233229

This commit is contained in:
Maciej J. Bowszys 2026-09-22 23:32:29 +02:00
parent 4aae36db79
commit 01f644b8d9
46 changed files with 2999 additions and 2760 deletions

View File

@ -28,3 +28,23 @@
2026-09-22 16:20:44,715 [INFO] LogOutputStream:77 - [STDOUT_REDIRECT] Updating builder args for config Debug to buildDir=build/Debug
2026-09-22 16:20:49,184 [INFO] LogOutputStream:77 - [STDOUT_REDIRECT] Updating builder args for config Debug to buildDir=build/Debug
2026-09-22 16:24:59,908 [INFO] LogOutputStream:77 - [STDOUT_REDIRECT] Updating builder args for config Debug to buildDir=build/Debug
2026-09-22 22:56:24,050 [INFO] LogOutputStream:77 - [STDOUT_REDIRECT] Updating builder args for config Debug to buildDir=build/Debug
2026-09-22 23:03:55,244 [INFO] LogOutputStream:77 - [STDOUT_REDIRECT] Updating builder args for config Debug to buildDir=build/Debug
2026-09-22 23:05:13,835 [INFO] LogOutputStream:77 - [STDOUT_REDIRECT] Updating builder args for config Debug to buildDir=build/Debug
2026-09-22 23:06:13,132 [INFO] LogOutputStream:77 - [STDOUT_REDIRECT] Updating builder args for config Debug to buildDir=build/Debug
2026-09-22 23:06:42,205 [INFO] LogOutputStream:77 - [STDOUT_REDIRECT] Updating builder args for config Debug to buildDir=build/Debug
2026-09-22 23:07:05,903 [INFO] LogOutputStream:77 - [STDOUT_REDIRECT] Updating builder args for config Debug to buildDir=build/Debug
2026-09-22 23:07:36,543 [INFO] LogOutputStream:77 - [STDOUT_REDIRECT] Updating builder args for config Debug to buildDir=build/Debug
2026-09-22 23:08:16,616 [INFO] LogOutputStream:77 - [STDOUT_REDIRECT] Updating builder args for config Debug to buildDir=build/Debug
2026-09-22 23:09:18,493 [INFO] LogOutputStream:77 - [STDOUT_REDIRECT] Updating builder args for config Debug to buildDir=build/Debug
2026-09-22 23:09:50,431 [INFO] LogOutputStream:77 - [STDOUT_REDIRECT] Updating builder args for config Debug to buildDir=build/Debug
2026-09-22 23:10:47,628 [INFO] LogOutputStream:77 - [STDOUT_REDIRECT] Updating builder args for config Debug to buildDir=build/Debug
2026-09-22 23:11:34,877 [INFO] LogOutputStream:77 - [STDOUT_REDIRECT] Updating builder args for config Debug to buildDir=build/Debug
2026-09-22 23:16:22,185 [INFO] LogOutputStream:77 - [STDOUT_REDIRECT] Updating builder args for config Debug to buildDir=build/Debug
2026-09-22 23:18:33,546 [INFO] LogOutputStream:77 - [STDOUT_REDIRECT] Updating builder args for config Debug to buildDir=build/Debug
2026-09-22 23:20:28,892 [INFO] LogOutputStream:77 - [STDOUT_REDIRECT] Updating builder args for config Debug to buildDir=build/Debug
2026-09-22 23:22:36,835 [INFO] LogOutputStream:77 - [STDOUT_REDIRECT] Updating builder args for config Debug to buildDir=build/Debug
2026-09-22 23:23:12,726 [INFO] LogOutputStream:77 - [STDOUT_REDIRECT] Updating builder args for config Debug to buildDir=build/Debug
2026-09-22 23:23:46,911 [INFO] LogOutputStream:77 - [STDOUT_REDIRECT] Updating builder args for config Debug to buildDir=build/Debug
2026-09-22 23:25:01,072 [INFO] LogOutputStream:77 - [STDOUT_REDIRECT] Updating builder args for config Debug to buildDir=build/Debug
2026-09-22 23:25:53,828 [INFO] LogOutputStream:77 - [STDOUT_REDIRECT] Updating builder args for config Debug to buildDir=build/Debug

View File

@ -1,4 +1,4 @@
16:20:44 **** Incremental Build of configuration Debug for project test4_f4_eth ****
23:25:01 **** Incremental Build of configuration Debug for project test4_f4_eth ****
cmake --build build/Debug
[1/2] Building C object CMakeFiles/test4_f4_eth.dir/Core/Src/main.c.obj
/home/mbowszys/polip/PWr_AiR_eng/test/test4_f4_eth/test4_f4_eth/Core/Src/main.c: In function '_write':
@ -15,141 +15,58 @@ In file included from /home/mbowszys/polip/PWr_AiR_eng/test/test4_f4_eth/test4_f
745 | HAL_StatusTypeDef HAL_UART_Transmit(UART_HandleTypeDef *huart, const uint8_t *pData, uint16_t Size, uint32_t Timeout);
| ~~~~~~~~~~~~~~~^~~~~
/home/mbowszys/polip/PWr_AiR_eng/test/test4_f4_eth/test4_f4_eth/Core/Src/main.c: In function 'main':
/home/mbowszys/polip/PWr_AiR_eng/test/test4_f4_eth/test4_f4_eth/Core/Src/main.c:222:32: warning: passing argument 1 of 'neoNet_prepRead0' discards 'const' qualifier from pointer target type [-Wdiscarded-qualifiers]
222 | ret = neoNet_prepRead0(&dev, &pack);
| ^~~~
/home/mbowszys/polip/PWr_AiR_eng/test/test4_f4_eth/test4_f4_eth/Core/Src/main.c:223:35: warning: passing argument 1 of 'neoNet_prepRead' discards 'const' qualifier from pointer target type [-Wdiscarded-qualifiers]
223 | ret = neoNet_prepRead(&dev, &pack_in, i_lyr);
| ^~~~
In file included from /home/mbowszys/polip/PWr_AiR_eng/test/test4_f4_eth/test4_f4_eth/Core/Src/main.c:34:
/home/mbowszys/polip/PWr_AiR_eng/test/test4_f4_eth/test4_f4_eth/Libs/neoNet/inc/lib_neoNet.h:8:48: note: expected 'neoNet_utils_DevInfo *' but argument is of type 'const neoNet_utils_DevInfo *'
8 | int16_t neoNet_prepRead0(neoNet_utils_DevInfo* in_dev, neoNet_Packet* inout_packet);
| ~~~~~~~~~~~~~~~~~~~~~~^~~~~~
/home/mbowszys/polip/PWr_AiR_eng/test/test4_f4_eth/test4_f4_eth/Core/Src/main.c:237:32: warning: passing argument 1 of 'neoNet_prepRead1' discards 'const' qualifier from pointer target type [-Wdiscarded-qualifiers]
237 | ret = neoNet_prepRead1(&dev, &pack);
| ^~~~
/home/mbowszys/polip/PWr_AiR_eng/test/test4_f4_eth/test4_f4_eth/Libs/neoNet/inc/lib_neoNet.h:9:48: note: expected 'neoNet_utils_DevInfo *' but argument is of type 'const neoNet_utils_DevInfo *'
9 | int16_t neoNet_prepRead1(neoNet_utils_DevInfo* in_dev, neoNet_Packet* inout_packet);
| ~~~~~~~~~~~~~~~~~~~~~~^~~~~~
/home/mbowszys/polip/PWr_AiR_eng/test/test4_f4_eth/test4_f4_eth/Core/Src/main.c:258:32: warning: passing argument 1 of 'neoNet_prepRead2' discards 'const' qualifier from pointer target type [-Wdiscarded-qualifiers]
258 | ret = neoNet_prepRead2(&dev, &pack);
| ^~~~
/home/mbowszys/polip/PWr_AiR_eng/test/test4_f4_eth/test4_f4_eth/Libs/neoNet/inc/lib_neoNet.h:10:48: note: expected 'neoNet_utils_DevInfo *' but argument is of type 'const neoNet_utils_DevInfo *'
10 | int16_t neoNet_prepRead2(neoNet_utils_DevInfo* in_dev, neoNet_Packet* inout_packet);
| ~~~~~~~~~~~~~~~~~~~~~~^~~~~~
/home/mbowszys/polip/PWr_AiR_eng/test/test4_f4_eth/test4_f4_eth/Core/Src/main.c:266:32: warning: passing argument 1 of 'neoNet_prepResp0' discards 'const' qualifier from pointer target type [-Wdiscarded-qualifiers]
266 | ret = neoNet_prepResp0(&dev, &pack);
| ^~~~
/home/mbowszys/polip/PWr_AiR_eng/test/test4_f4_eth/test4_f4_eth/Libs/neoNet/inc/lib_neoNet.h:15:48: note: expected 'neoNet_utils_DevInfo *' but argument is of type 'const neoNet_utils_DevInfo *'
15 | int16_t neoNet_prepResp0(neoNet_utils_DevInfo* in_dev, neoNet_Packet* inout_packet);
| ~~~~~~~~~~~~~~~~~~~~~~^~~~~~
/home/mbowszys/polip/PWr_AiR_eng/test/test4_f4_eth/test4_f4_eth/Core/Src/main.c:268:32: warning: passing argument 1 of 'neoNet_prepResp1' discards 'const' qualifier from pointer target type [-Wdiscarded-qualifiers]
268 | ret = neoNet_prepResp1(&dev, &pack);
| ^~~~
/home/mbowszys/polip/PWr_AiR_eng/test/test4_f4_eth/test4_f4_eth/Libs/neoNet/inc/lib_neoNet.h:16:48: note: expected 'neoNet_utils_DevInfo *' but argument is of type 'const neoNet_utils_DevInfo *'
16 | int16_t neoNet_prepResp1(neoNet_utils_DevInfo* in_dev, neoNet_Packet* inout_packet);
| ~~~~~~~~~~~~~~~~~~~~~~^~~~~~
/home/mbowszys/polip/PWr_AiR_eng/test/test4_f4_eth/test4_f4_eth/Core/Src/main.c:270:32: warning: passing argument 1 of 'neoNet_prepResp2' discards 'const' qualifier from pointer target type [-Wdiscarded-qualifiers]
270 | ret = neoNet_prepResp2(&dev, &pack);
| ^~~~
/home/mbowszys/polip/PWr_AiR_eng/test/test4_f4_eth/test4_f4_eth/Libs/neoNet/inc/lib_neoNet.h:17:48: note: expected 'neoNet_utils_DevInfo *' but argument is of type 'const neoNet_utils_DevInfo *'
17 | int16_t neoNet_prepResp2(neoNet_utils_DevInfo* in_dev, neoNet_Packet* inout_packet);
| ~~~~~~~~~~~~~~~~~~~~~~^~~~~~
/home/mbowszys/polip/PWr_AiR_eng/test/test4_f4_eth/test4_f4_eth/Core/Src/main.c:273:32: warning: passing argument 1 of 'neoNet_prepSend2' discards 'const' qualifier from pointer target type [-Wdiscarded-qualifiers]
273 | ret = neoNet_prepSend2(&dev, &pack);
| ^~~~
/home/mbowszys/polip/PWr_AiR_eng/test/test4_f4_eth/test4_f4_eth/Libs/neoNet/inc/lib_neoNet.h:19:48: note: expected 'neoNet_utils_DevInfo *' but argument is of type 'const neoNet_utils_DevInfo *'
19 | int16_t neoNet_prepSend2(neoNet_utils_DevInfo* in_dev, neoNet_Packet* inout_packet);
| ~~~~~~~~~~~~~~~~~~~~~~^~~~~~
/home/mbowszys/polip/PWr_AiR_eng/test/test4_f4_eth/test4_f4_eth/Core/Src/main.c:275:32: warning: passing argument 1 of 'neoNet_prepSend1' discards 'const' qualifier from pointer target type [-Wdiscarded-qualifiers]
275 | ret = neoNet_prepSend1(&dev, &pack);
| ^~~~
/home/mbowszys/polip/PWr_AiR_eng/test/test4_f4_eth/test4_f4_eth/Libs/neoNet/inc/lib_neoNet.h:20:48: note: expected 'neoNet_utils_DevInfo *' but argument is of type 'const neoNet_utils_DevInfo *'
20 | int16_t neoNet_prepSend1(neoNet_utils_DevInfo* in_dev, neoNet_Packet* inout_packet);
| ~~~~~~~~~~~~~~~~~~~~~~^~~~~~
/home/mbowszys/polip/PWr_AiR_eng/test/test4_f4_eth/test4_f4_eth/Core/Src/main.c:277:32: warning: passing argument 1 of 'neoNet_prepSend0' discards 'const' qualifier from pointer target type [-Wdiscarded-qualifiers]
277 | ret = neoNet_prepSend0(&dev, &pack);
| ^~~~
/home/mbowszys/polip/PWr_AiR_eng/test/test4_f4_eth/test4_f4_eth/Libs/neoNet/inc/lib_neoNet.h:21:48: note: expected 'neoNet_utils_DevInfo *' but argument is of type 'const neoNet_utils_DevInfo *'
21 | int16_t neoNet_prepSend0(neoNet_utils_DevInfo* in_dev, neoNet_Packet* inout_packet);
| ~~~~~~~~~~~~~~~~~~~~~~^~~~~~
/home/mbowszys/polip/PWr_AiR_eng/test/test4_f4_eth/test4_f4_eth/Libs/neoNet/inc/lib_neoNet.h:8:47: note: expected 'neoNet_utils_DevInfo *' but argument is of type 'const neoNet_utils_DevInfo *'
8 | int16_t neoNet_prepRead(neoNet_utils_DevInfo* in_dev, neoNet_Packet* in_pack, uint8_t in_lyr);
| ~~~~~~~~~~~~~~~~~~~~~~^~~~~~
/home/mbowszys/polip/PWr_AiR_eng/test/test4_f4_eth/test4_f4_eth/Core/Src/main.c:229:34: warning: enumeration value 'NOPROT' not handled in switch [-Wswitch]
229 | neoNet_printf("type0:"); switch(pack_in.type[0]){case ETH: neoNet_printf("ETH\r\n"); break;}
| ^~~~~~
/home/mbowszys/polip/PWr_AiR_eng/test/test4_f4_eth/test4_f4_eth/Core/Src/main.c:229:34: warning: enumeration value 'ARP' not handled in switch [-Wswitch]
/home/mbowszys/polip/PWr_AiR_eng/test/test4_f4_eth/test4_f4_eth/Core/Src/main.c:229:34: warning: enumeration value 'IP4' not handled in switch [-Wswitch]
/home/mbowszys/polip/PWr_AiR_eng/test/test4_f4_eth/test4_f4_eth/Core/Src/main.c:229:34: warning: enumeration value 'ICMP' not handled in switch [-Wswitch]
/home/mbowszys/polip/PWr_AiR_eng/test/test4_f4_eth/test4_f4_eth/Core/Src/main.c:229:34: warning: enumeration value 'IGMP' not handled in switch [-Wswitch]
/home/mbowszys/polip/PWr_AiR_eng/test/test4_f4_eth/test4_f4_eth/Core/Src/main.c:229:34: warning: enumeration value 'TCP' not handled in switch [-Wswitch]
/home/mbowszys/polip/PWr_AiR_eng/test/test4_f4_eth/test4_f4_eth/Core/Src/main.c:229:34: warning: enumeration value 'UDP' not handled in switch [-Wswitch]
/home/mbowszys/polip/PWr_AiR_eng/test/test4_f4_eth/test4_f4_eth/Core/Src/main.c:229:34: warning: enumeration value 'HTTP' not handled in switch [-Wswitch]
/home/mbowszys/polip/PWr_AiR_eng/test/test4_f4_eth/test4_f4_eth/Core/Src/main.c:229:34: warning: enumeration value 'RTP' not handled in switch [-Wswitch]
/home/mbowszys/polip/PWr_AiR_eng/test/test4_f4_eth/test4_f4_eth/Core/Src/main.c:230:33: warning: enumeration value 'NOPROT' not handled in switch [-Wswitch]
230 | neoNet_printf("type1:");switch(pack_in.type[1]){case ARP: neoNet_printf("ARP\r\n"); break; case IP4: neoNet_printf("IP4\r\n"); break;}
| ^~~~~~
/home/mbowszys/polip/PWr_AiR_eng/test/test4_f4_eth/test4_f4_eth/Core/Src/main.c:230:33: warning: enumeration value 'ETH' not handled in switch [-Wswitch]
/home/mbowszys/polip/PWr_AiR_eng/test/test4_f4_eth/test4_f4_eth/Core/Src/main.c:230:33: warning: enumeration value 'ICMP' not handled in switch [-Wswitch]
/home/mbowszys/polip/PWr_AiR_eng/test/test4_f4_eth/test4_f4_eth/Core/Src/main.c:230:33: warning: enumeration value 'IGMP' not handled in switch [-Wswitch]
/home/mbowszys/polip/PWr_AiR_eng/test/test4_f4_eth/test4_f4_eth/Core/Src/main.c:230:33: warning: enumeration value 'TCP' not handled in switch [-Wswitch]
/home/mbowszys/polip/PWr_AiR_eng/test/test4_f4_eth/test4_f4_eth/Core/Src/main.c:230:33: warning: enumeration value 'UDP' not handled in switch [-Wswitch]
/home/mbowszys/polip/PWr_AiR_eng/test/test4_f4_eth/test4_f4_eth/Core/Src/main.c:230:33: warning: enumeration value 'HTTP' not handled in switch [-Wswitch]
/home/mbowszys/polip/PWr_AiR_eng/test/test4_f4_eth/test4_f4_eth/Core/Src/main.c:230:33: warning: enumeration value 'RTP' not handled in switch [-Wswitch]
/home/mbowszys/polip/PWr_AiR_eng/test/test4_f4_eth/test4_f4_eth/Core/Src/main.c:231:33: warning: enumeration value 'NOPROT' not handled in switch [-Wswitch]
231 | neoNet_printf("type2:");switch(pack_in.type[2]){case ICMP: neoNet_printf("ICMP\r\n"); break; case IGMP: neoNet_printf("IGMP\r\n"); break; case TCP: neoNet_printf("TCP\r\n"); break; case UDP: neoNet_printf("UDP\r\n"); break;}
| ^~~~~~
/home/mbowszys/polip/PWr_AiR_eng/test/test4_f4_eth/test4_f4_eth/Core/Src/main.c:231:33: warning: enumeration value 'ETH' not handled in switch [-Wswitch]
/home/mbowszys/polip/PWr_AiR_eng/test/test4_f4_eth/test4_f4_eth/Core/Src/main.c:231:33: warning: enumeration value 'ARP' not handled in switch [-Wswitch]
/home/mbowszys/polip/PWr_AiR_eng/test/test4_f4_eth/test4_f4_eth/Core/Src/main.c:231:33: warning: enumeration value 'IP4' not handled in switch [-Wswitch]
/home/mbowszys/polip/PWr_AiR_eng/test/test4_f4_eth/test4_f4_eth/Core/Src/main.c:231:33: warning: enumeration value 'HTTP' not handled in switch [-Wswitch]
/home/mbowszys/polip/PWr_AiR_eng/test/test4_f4_eth/test4_f4_eth/Core/Src/main.c:231:33: warning: enumeration value 'RTP' not handled in switch [-Wswitch]
/home/mbowszys/polip/PWr_AiR_eng/test/test4_f4_eth/test4_f4_eth/Core/Src/main.c:236:31: warning: passing argument 1 of 'neoNet_prepResp' discards 'const' qualifier from pointer target type [-Wdiscarded-qualifiers]
236 | ret = neoNet_prepResp(&dev, &pack_in, &pack_out);
| ^~~~
/home/mbowszys/polip/PWr_AiR_eng/test/test4_f4_eth/test4_f4_eth/Libs/neoNet/inc/lib_neoNet.h:9:47: note: expected 'neoNet_utils_DevInfo *' but argument is of type 'const neoNet_utils_DevInfo *'
9 | int16_t neoNet_prepResp(neoNet_utils_DevInfo* in_dev, neoNet_Packet* in_pack, neoNet_Packet* out_pack);
| ~~~~~~~~~~~~~~~~~~~~~~^~~~~~
/home/mbowszys/polip/PWr_AiR_eng/test/test4_f4_eth/test4_f4_eth/Core/Src/main.c:243:35: warning: passing argument 1 of 'neoNet_prepSend' discards 'const' qualifier from pointer target type [-Wdiscarded-qualifiers]
243 | ret = neoNet_prepSend(&dev, &pack_out, i_lyr);
| ^~~~
/home/mbowszys/polip/PWr_AiR_eng/test/test4_f4_eth/test4_f4_eth/Libs/neoNet/inc/lib_neoNet.h:10:47: note: expected 'neoNet_utils_DevInfo *' but argument is of type 'const neoNet_utils_DevInfo *'
10 | int16_t neoNet_prepSend(neoNet_utils_DevInfo* in_dev, neoNet_Packet* out_pack, uint8_t in_lyr);
| ~~~~~~~~~~~~~~~~~~~~~~^~~~~~
[2/2] Linking C executable test4_f4_eth.elf
Memory region Used Size Region Size %age Used
RAM: 12144 B 128 KB 9.27%
FLASH: 31952 B 512 KB 6.09%
16:20:49 **** Incremental Build of configuration Debug for project test4_f4_eth ****
RAM: 13720 B 128 KB 10.47%
FLASH: 32400 B 512 KB 6.18%
23:25:53 **** Incremental Build of configuration Debug for project test4_f4_eth ****
cmake --build build/Debug
ninja: no work to do.
16:24:59 **** Incremental Build of configuration Debug for project test4_f4_eth ****
cmake --build build/Debug
[1/2] Building C object CMakeFiles/test4_f4_eth.dir/Core/Src/main.c.obj
/home/mbowszys/polip/PWr_AiR_eng/test/test4_f4_eth/test4_f4_eth/Core/Src/main.c: In function '_write':
/home/mbowszys/polip/PWr_AiR_eng/test/test4_f4_eth/test4_f4_eth/Core/Src/main.c:77:32: warning: pointer targets in passing argument 2 of 'HAL_UART_Transmit' differ in signedness [-Wpointer-sign]
77 | HAL_UART_Transmit(&huart2, ptr, len, 50 );
| ^~~
| |
| char *
In file included from /home/mbowszys/polip/PWr_AiR_eng/test/test4_f4_eth/test4_f4_eth/cmake/stm32cubemx/../../Core/Inc/stm32f4xx_hal_conf.h:411,
from /home/mbowszys/polip/PWr_AiR_eng/test/test4_f4_eth/test4_f4_eth/cmake/stm32cubemx/../../Drivers/STM32F4xx_HAL_Driver/Inc/stm32f4xx_hal.h:29,
from /home/mbowszys/polip/PWr_AiR_eng/test/test4_f4_eth/test4_f4_eth/cmake/stm32cubemx/../../Core/Inc/main.h:30,
from /home/mbowszys/polip/PWr_AiR_eng/test/test4_f4_eth/test4_f4_eth/Core/Src/main.c:20:
/home/mbowszys/polip/PWr_AiR_eng/test/test4_f4_eth/test4_f4_eth/cmake/stm32cubemx/../../Drivers/STM32F4xx_HAL_Driver/Inc/stm32f4xx_hal_uart.h:745:79: note: expected 'const uint8_t *' {aka 'const unsigned char *'} but argument is of type 'char *'
745 | HAL_StatusTypeDef HAL_UART_Transmit(UART_HandleTypeDef *huart, const uint8_t *pData, uint16_t Size, uint32_t Timeout);
| ~~~~~~~~~~~~~~~^~~~~
/home/mbowszys/polip/PWr_AiR_eng/test/test4_f4_eth/test4_f4_eth/Core/Src/main.c: In function 'main':
/home/mbowszys/polip/PWr_AiR_eng/test/test4_f4_eth/test4_f4_eth/Core/Src/main.c:217:32: warning: passing argument 1 of 'neoNet_prepRead0' discards 'const' qualifier from pointer target type [-Wdiscarded-qualifiers]
217 | ret = neoNet_prepRead0(&dev, &pack);
| ^~~~
In file included from /home/mbowszys/polip/PWr_AiR_eng/test/test4_f4_eth/test4_f4_eth/Core/Src/main.c:34:
/home/mbowszys/polip/PWr_AiR_eng/test/test4_f4_eth/test4_f4_eth/Libs/neoNet/inc/lib_neoNet.h:8:48: note: expected 'neoNet_utils_DevInfo *' but argument is of type 'const neoNet_utils_DevInfo *'
8 | int16_t neoNet_prepRead0(neoNet_utils_DevInfo* in_dev, neoNet_Packet* inout_packet);
| ~~~~~~~~~~~~~~~~~~~~~~^~~~~~
/home/mbowszys/polip/PWr_AiR_eng/test/test4_f4_eth/test4_f4_eth/Core/Src/main.c:224:32: warning: passing argument 1 of 'neoNet_prepRead1' discards 'const' qualifier from pointer target type [-Wdiscarded-qualifiers]
224 | ret = neoNet_prepRead1(&dev, &pack);
| ^~~~
/home/mbowszys/polip/PWr_AiR_eng/test/test4_f4_eth/test4_f4_eth/Libs/neoNet/inc/lib_neoNet.h:9:48: note: expected 'neoNet_utils_DevInfo *' but argument is of type 'const neoNet_utils_DevInfo *'
9 | int16_t neoNet_prepRead1(neoNet_utils_DevInfo* in_dev, neoNet_Packet* inout_packet);
| ~~~~~~~~~~~~~~~~~~~~~~^~~~~~
/home/mbowszys/polip/PWr_AiR_eng/test/test4_f4_eth/test4_f4_eth/Core/Src/main.c:231:32: warning: passing argument 1 of 'neoNet_prepRead2' discards 'const' qualifier from pointer target type [-Wdiscarded-qualifiers]
231 | ret = neoNet_prepRead2(&dev, &pack);
| ^~~~
/home/mbowszys/polip/PWr_AiR_eng/test/test4_f4_eth/test4_f4_eth/Libs/neoNet/inc/lib_neoNet.h:10:48: note: expected 'neoNet_utils_DevInfo *' but argument is of type 'const neoNet_utils_DevInfo *'
10 | int16_t neoNet_prepRead2(neoNet_utils_DevInfo* in_dev, neoNet_Packet* inout_packet);
| ~~~~~~~~~~~~~~~~~~~~~~^~~~~~
/home/mbowszys/polip/PWr_AiR_eng/test/test4_f4_eth/test4_f4_eth/Core/Src/main.c:242:32: warning: passing argument 1 of 'neoNet_prepResp0' discards 'const' qualifier from pointer target type [-Wdiscarded-qualifiers]
242 | ret = neoNet_prepResp0(&dev, &pack);
| ^~~~
/home/mbowszys/polip/PWr_AiR_eng/test/test4_f4_eth/test4_f4_eth/Libs/neoNet/inc/lib_neoNet.h:15:48: note: expected 'neoNet_utils_DevInfo *' but argument is of type 'const neoNet_utils_DevInfo *'
15 | int16_t neoNet_prepResp0(neoNet_utils_DevInfo* in_dev, neoNet_Packet* inout_packet);
| ~~~~~~~~~~~~~~~~~~~~~~^~~~~~
/home/mbowszys/polip/PWr_AiR_eng/test/test4_f4_eth/test4_f4_eth/Core/Src/main.c:244:32: warning: passing argument 1 of 'neoNet_prepResp1' discards 'const' qualifier from pointer target type [-Wdiscarded-qualifiers]
244 | ret = neoNet_prepResp1(&dev, &pack);
| ^~~~
/home/mbowszys/polip/PWr_AiR_eng/test/test4_f4_eth/test4_f4_eth/Libs/neoNet/inc/lib_neoNet.h:16:48: note: expected 'neoNet_utils_DevInfo *' but argument is of type 'const neoNet_utils_DevInfo *'
16 | int16_t neoNet_prepResp1(neoNet_utils_DevInfo* in_dev, neoNet_Packet* inout_packet);
| ~~~~~~~~~~~~~~~~~~~~~~^~~~~~
/home/mbowszys/polip/PWr_AiR_eng/test/test4_f4_eth/test4_f4_eth/Core/Src/main.c:246:32: warning: passing argument 1 of 'neoNet_prepResp2' discards 'const' qualifier from pointer target type [-Wdiscarded-qualifiers]
246 | ret = neoNet_prepResp2(&dev, &pack);
| ^~~~
/home/mbowszys/polip/PWr_AiR_eng/test/test4_f4_eth/test4_f4_eth/Libs/neoNet/inc/lib_neoNet.h:17:48: note: expected 'neoNet_utils_DevInfo *' but argument is of type 'const neoNet_utils_DevInfo *'
17 | int16_t neoNet_prepResp2(neoNet_utils_DevInfo* in_dev, neoNet_Packet* inout_packet);
| ~~~~~~~~~~~~~~~~~~~~~~^~~~~~
/home/mbowszys/polip/PWr_AiR_eng/test/test4_f4_eth/test4_f4_eth/Core/Src/main.c:249:32: warning: passing argument 1 of 'neoNet_prepSend2' discards 'const' qualifier from pointer target type [-Wdiscarded-qualifiers]
249 | ret = neoNet_prepSend2(&dev, &pack);
| ^~~~
/home/mbowszys/polip/PWr_AiR_eng/test/test4_f4_eth/test4_f4_eth/Libs/neoNet/inc/lib_neoNet.h:19:48: note: expected 'neoNet_utils_DevInfo *' but argument is of type 'const neoNet_utils_DevInfo *'
19 | int16_t neoNet_prepSend2(neoNet_utils_DevInfo* in_dev, neoNet_Packet* inout_packet);
| ~~~~~~~~~~~~~~~~~~~~~~^~~~~~
/home/mbowszys/polip/PWr_AiR_eng/test/test4_f4_eth/test4_f4_eth/Core/Src/main.c:251:32: warning: passing argument 1 of 'neoNet_prepSend1' discards 'const' qualifier from pointer target type [-Wdiscarded-qualifiers]
251 | ret = neoNet_prepSend1(&dev, &pack);
| ^~~~
/home/mbowszys/polip/PWr_AiR_eng/test/test4_f4_eth/test4_f4_eth/Libs/neoNet/inc/lib_neoNet.h:20:48: note: expected 'neoNet_utils_DevInfo *' but argument is of type 'const neoNet_utils_DevInfo *'
20 | int16_t neoNet_prepSend1(neoNet_utils_DevInfo* in_dev, neoNet_Packet* inout_packet);
| ~~~~~~~~~~~~~~~~~~~~~~^~~~~~
/home/mbowszys/polip/PWr_AiR_eng/test/test4_f4_eth/test4_f4_eth/Core/Src/main.c:253:32: warning: passing argument 1 of 'neoNet_prepSend0' discards 'const' qualifier from pointer target type [-Wdiscarded-qualifiers]
253 | ret = neoNet_prepSend0(&dev, &pack);
| ^~~~
/home/mbowszys/polip/PWr_AiR_eng/test/test4_f4_eth/test4_f4_eth/Libs/neoNet/inc/lib_neoNet.h:21:48: note: expected 'neoNet_utils_DevInfo *' but argument is of type 'const neoNet_utils_DevInfo *'
21 | int16_t neoNet_prepSend0(neoNet_utils_DevInfo* in_dev, neoNet_Packet* inout_packet);
| ~~~~~~~~~~~~~~~~~~~~~~^~~~~~
[2/2] Linking C executable test4_f4_eth.elf
Memory region Used Size Region Size %age Used
RAM: 12144 B 128 KB 9.27%
FLASH: 31880 B 512 KB 6.08%

View File

@ -1,79 +1,6 @@
16:24:59 **** Incremental Build of configuration Debug for project test4_f4_eth ****
23:25:53 **** Incremental Build of configuration Debug for project test4_f4_eth ****
cmake --build build/Debug
[1/2] Building C object CMakeFiles/test4_f4_eth.dir/Core/Src/main.c.obj
/home/mbowszys/polip/PWr_AiR_eng/test/test4_f4_eth/test4_f4_eth/Core/Src/main.c: In function '_write':
/home/mbowszys/polip/PWr_AiR_eng/test/test4_f4_eth/test4_f4_eth/Core/Src/main.c:77:32: warning: pointer targets in passing argument 2 of 'HAL_UART_Transmit' differ in signedness [-Wpointer-sign]
77 | HAL_UART_Transmit(&huart2, ptr, len, 50 );
| ^~~
| |
| char *
In file included from /home/mbowszys/polip/PWr_AiR_eng/test/test4_f4_eth/test4_f4_eth/cmake/stm32cubemx/../../Core/Inc/stm32f4xx_hal_conf.h:411,
from /home/mbowszys/polip/PWr_AiR_eng/test/test4_f4_eth/test4_f4_eth/cmake/stm32cubemx/../../Drivers/STM32F4xx_HAL_Driver/Inc/stm32f4xx_hal.h:29,
from /home/mbowszys/polip/PWr_AiR_eng/test/test4_f4_eth/test4_f4_eth/cmake/stm32cubemx/../../Core/Inc/main.h:30,
from /home/mbowszys/polip/PWr_AiR_eng/test/test4_f4_eth/test4_f4_eth/Core/Src/main.c:20:
/home/mbowszys/polip/PWr_AiR_eng/test/test4_f4_eth/test4_f4_eth/cmake/stm32cubemx/../../Drivers/STM32F4xx_HAL_Driver/Inc/stm32f4xx_hal_uart.h:745:79: note: expected 'const uint8_t *' {aka 'const unsigned char *'} but argument is of type 'char *'
745 | HAL_StatusTypeDef HAL_UART_Transmit(UART_HandleTypeDef *huart, const uint8_t *pData, uint16_t Size, uint32_t Timeout);
| ~~~~~~~~~~~~~~~^~~~~
/home/mbowszys/polip/PWr_AiR_eng/test/test4_f4_eth/test4_f4_eth/Core/Src/main.c: In function 'main':
/home/mbowszys/polip/PWr_AiR_eng/test/test4_f4_eth/test4_f4_eth/Core/Src/main.c:217:32: warning: passing argument 1 of 'neoNet_prepRead0' discards 'const' qualifier from pointer target type [-Wdiscarded-qualifiers]
217 | ret = neoNet_prepRead0(&dev, &pack);
| ^~~~
In file included from /home/mbowszys/polip/PWr_AiR_eng/test/test4_f4_eth/test4_f4_eth/Core/Src/main.c:34:
/home/mbowszys/polip/PWr_AiR_eng/test/test4_f4_eth/test4_f4_eth/Libs/neoNet/inc/lib_neoNet.h:8:48: note: expected 'neoNet_utils_DevInfo *' but argument is of type 'const neoNet_utils_DevInfo *'
8 | int16_t neoNet_prepRead0(neoNet_utils_DevInfo* in_dev, neoNet_Packet* inout_packet);
| ~~~~~~~~~~~~~~~~~~~~~~^~~~~~
/home/mbowszys/polip/PWr_AiR_eng/test/test4_f4_eth/test4_f4_eth/Core/Src/main.c:224:32: warning: passing argument 1 of 'neoNet_prepRead1' discards 'const' qualifier from pointer target type [-Wdiscarded-qualifiers]
224 | ret = neoNet_prepRead1(&dev, &pack);
| ^~~~
/home/mbowszys/polip/PWr_AiR_eng/test/test4_f4_eth/test4_f4_eth/Libs/neoNet/inc/lib_neoNet.h:9:48: note: expected 'neoNet_utils_DevInfo *' but argument is of type 'const neoNet_utils_DevInfo *'
9 | int16_t neoNet_prepRead1(neoNet_utils_DevInfo* in_dev, neoNet_Packet* inout_packet);
| ~~~~~~~~~~~~~~~~~~~~~~^~~~~~
/home/mbowszys/polip/PWr_AiR_eng/test/test4_f4_eth/test4_f4_eth/Core/Src/main.c:231:32: warning: passing argument 1 of 'neoNet_prepRead2' discards 'const' qualifier from pointer target type [-Wdiscarded-qualifiers]
231 | ret = neoNet_prepRead2(&dev, &pack);
| ^~~~
/home/mbowszys/polip/PWr_AiR_eng/test/test4_f4_eth/test4_f4_eth/Libs/neoNet/inc/lib_neoNet.h:10:48: note: expected 'neoNet_utils_DevInfo *' but argument is of type 'const neoNet_utils_DevInfo *'
10 | int16_t neoNet_prepRead2(neoNet_utils_DevInfo* in_dev, neoNet_Packet* inout_packet);
| ~~~~~~~~~~~~~~~~~~~~~~^~~~~~
/home/mbowszys/polip/PWr_AiR_eng/test/test4_f4_eth/test4_f4_eth/Core/Src/main.c:242:32: warning: passing argument 1 of 'neoNet_prepResp0' discards 'const' qualifier from pointer target type [-Wdiscarded-qualifiers]
242 | ret = neoNet_prepResp0(&dev, &pack);
| ^~~~
/home/mbowszys/polip/PWr_AiR_eng/test/test4_f4_eth/test4_f4_eth/Libs/neoNet/inc/lib_neoNet.h:15:48: note: expected 'neoNet_utils_DevInfo *' but argument is of type 'const neoNet_utils_DevInfo *'
15 | int16_t neoNet_prepResp0(neoNet_utils_DevInfo* in_dev, neoNet_Packet* inout_packet);
| ~~~~~~~~~~~~~~~~~~~~~~^~~~~~
/home/mbowszys/polip/PWr_AiR_eng/test/test4_f4_eth/test4_f4_eth/Core/Src/main.c:244:32: warning: passing argument 1 of 'neoNet_prepResp1' discards 'const' qualifier from pointer target type [-Wdiscarded-qualifiers]
244 | ret = neoNet_prepResp1(&dev, &pack);
| ^~~~
/home/mbowszys/polip/PWr_AiR_eng/test/test4_f4_eth/test4_f4_eth/Libs/neoNet/inc/lib_neoNet.h:16:48: note: expected 'neoNet_utils_DevInfo *' but argument is of type 'const neoNet_utils_DevInfo *'
16 | int16_t neoNet_prepResp1(neoNet_utils_DevInfo* in_dev, neoNet_Packet* inout_packet);
| ~~~~~~~~~~~~~~~~~~~~~~^~~~~~
/home/mbowszys/polip/PWr_AiR_eng/test/test4_f4_eth/test4_f4_eth/Core/Src/main.c:246:32: warning: passing argument 1 of 'neoNet_prepResp2' discards 'const' qualifier from pointer target type [-Wdiscarded-qualifiers]
246 | ret = neoNet_prepResp2(&dev, &pack);
| ^~~~
/home/mbowszys/polip/PWr_AiR_eng/test/test4_f4_eth/test4_f4_eth/Libs/neoNet/inc/lib_neoNet.h:17:48: note: expected 'neoNet_utils_DevInfo *' but argument is of type 'const neoNet_utils_DevInfo *'
17 | int16_t neoNet_prepResp2(neoNet_utils_DevInfo* in_dev, neoNet_Packet* inout_packet);
| ~~~~~~~~~~~~~~~~~~~~~~^~~~~~
/home/mbowszys/polip/PWr_AiR_eng/test/test4_f4_eth/test4_f4_eth/Core/Src/main.c:249:32: warning: passing argument 1 of 'neoNet_prepSend2' discards 'const' qualifier from pointer target type [-Wdiscarded-qualifiers]
249 | ret = neoNet_prepSend2(&dev, &pack);
| ^~~~
/home/mbowszys/polip/PWr_AiR_eng/test/test4_f4_eth/test4_f4_eth/Libs/neoNet/inc/lib_neoNet.h:19:48: note: expected 'neoNet_utils_DevInfo *' but argument is of type 'const neoNet_utils_DevInfo *'
19 | int16_t neoNet_prepSend2(neoNet_utils_DevInfo* in_dev, neoNet_Packet* inout_packet);
| ~~~~~~~~~~~~~~~~~~~~~~^~~~~~
/home/mbowszys/polip/PWr_AiR_eng/test/test4_f4_eth/test4_f4_eth/Core/Src/main.c:251:32: warning: passing argument 1 of 'neoNet_prepSend1' discards 'const' qualifier from pointer target type [-Wdiscarded-qualifiers]
251 | ret = neoNet_prepSend1(&dev, &pack);
| ^~~~
/home/mbowszys/polip/PWr_AiR_eng/test/test4_f4_eth/test4_f4_eth/Libs/neoNet/inc/lib_neoNet.h:20:48: note: expected 'neoNet_utils_DevInfo *' but argument is of type 'const neoNet_utils_DevInfo *'
20 | int16_t neoNet_prepSend1(neoNet_utils_DevInfo* in_dev, neoNet_Packet* inout_packet);
| ~~~~~~~~~~~~~~~~~~~~~~^~~~~~
/home/mbowszys/polip/PWr_AiR_eng/test/test4_f4_eth/test4_f4_eth/Core/Src/main.c:253:32: warning: passing argument 1 of 'neoNet_prepSend0' discards 'const' qualifier from pointer target type [-Wdiscarded-qualifiers]
253 | ret = neoNet_prepSend0(&dev, &pack);
| ^~~~
/home/mbowszys/polip/PWr_AiR_eng/test/test4_f4_eth/test4_f4_eth/Libs/neoNet/inc/lib_neoNet.h:21:48: note: expected 'neoNet_utils_DevInfo *' but argument is of type 'const neoNet_utils_DevInfo *'
21 | int16_t neoNet_prepSend0(neoNet_utils_DevInfo* in_dev, neoNet_Packet* inout_packet);
| ~~~~~~~~~~~~~~~~~~~~~~^~~~~~
[2/2] Linking C executable test4_f4_eth.elf
Memory region Used Size Region Size %age Used
RAM: 12144 B 128 KB 9.27%
FLASH: 31880 B 512 KB 6.08%
ninja: no work to do.
16:25:00 Build Finished. 0 errors, 10 warnings. (took 214ms)
23:25:53 Build Finished. 0 errors, 0 warnings. (took 66ms)

View File

@ -155,106 +155,102 @@ int main(void)
HAL_I2S_Transmit_DMA(&hi2s2, (uint16_t*)dac_buff, DAC_BUFF_1CH_FULLSIZE);
// == ENC init ==
static const neoNet_utils_DevInfo dev = {
.ipAddr = {192, 168, 81, 22},
.macAddr = {0x00, 0x17, 0x22, 0xed, 0xa5, 0x01}
};
//ENC28J60_Init();
if(ENC28J60_Init(dev.macAddr) != ENC28J60_OK){
neoNet_printf("Err_initing_enc\r\n");
while(1){;}
}
//static ENC28J60_Frame encFr;
static uint8_t ethFr[1514];
static neoNet_Packet pack;
pack.type0 = ETH;
//pack.data0 = encFr.data;
pack.data0 = (uint8_t*)&ethFr;
// == Eth frames ==
static uint8_t ethFr_in[1514];
static neoNet_Packet pack_in;
pack_in.type[0] = ETH;
pack_in.data[0] = (uint8_t*)&ethFr_in;
static uint8_t ethFr_out[1514];
static neoNet_Packet pack_out;
pack_out.type[0] = ETH;
pack_out.data[0] = (uint8_t*)&ethFr_out;
static int32_t ret;
int attempts = 0;
neoNet_printf("=== BOOT ===\r\n");
while (1)
{
//ETH_Process(&frame);
neoNet_printf("\r\n==\r\n");
while(1){
// == Read eth frame ==
do{
//memset(&encFr.data, 0, 1024);
//ret = ENC28J60_ReceiveFrame(&encFr);
ret = ENC28J60_ReceiveFrame(ethFr, sizeof(ethFr));
//neoNet_printf("ret:%d\r\n", ret);
//pack.len0 = ret<1024 ? ret : 1024;
if(ret<0){++attempts;}
ret = ENC28J60_ReceiveFrame(ethFr_in, sizeof(ethFr_in));
}while(ret <= 0);
pack.len0 = ret;
neoNet_printf("att:%d\r\n", attempts);
attempts = 1;
pack_in.len[0] = ret;
for(uint8_t lyr=1;lyr<NEONET_PACKET_LAYERS_NUM;++lyr){
pack_in.type[lyr] = NOPROT;
pack_in.len[lyr] = 0;
}
for(uint8_t lyr=0;lyr<NEONET_PACKET_LAYERS_NUM;++lyr){
pack_out.type[lyr] = NOPROT;
pack_out.len[lyr] = 0;
}
// == Desc start ==
neoNet_printf("Pack:\r\n");
neoNet_printf("len:%d\r\n", pack.len0);
neoNet_printf("len:%d\r\n", pack_in.len[0]);
neoNet_printf("==Fram==\r\n");
for(int i=0;i<pack.len0;++i){
//neoNet_printf("%02X ", ((uint8_t*)&encFr)[i]);
neoNet_printf("%02X ", ethFr[i]);
for(int i=0;i<pack_in.len[0];++i){
neoNet_printf("%02X ", ethFr_in[i]);
if(!((i+1)%16)){ neoNet_printf("\r\n"); }
}
neoNet_printf("\r\n== == ==\r\n");
neoNet_printf("type0:"); switch(pack.type0){case ETH: neoNet_printf("ETH\r\n"); break;}
ret = neoNet_prepRead0(&dev, &pack);
if(ret < 0){ neoNet_printf("err0:%02x\r\n", -ret); continue; }
neoNet_printf("type1:");switch(pack.type1){case ARP: neoNet_printf("ARP\r\n"); break; case IP4: neoNet_printf("IP4\r\n"); break;}
ret = neoNet_prepRead1(&dev, &pack);
if(ret < 0){ neoNet_printf("err1:%02x\r\n", -ret); continue; }
neoNet_printf("type2:");switch(pack.type2){case ICMP: neoNet_printf("ICMP\r\n"); break; case IGMP: neoNet_printf("IGMP\r\n"); break; case TCP: neoNet_printf("TCP\r\n"); break; case UDP: neoNet_printf("UDP\r\n"); break;}
ret = neoNet_prepRead2(&dev, &pack);
if(ret < 0){ neoNet_printf("err2:%02x\r\n", -ret); continue; }
// == PrepRead ethFr_in ==
for(uint8_t i_lyr=0;i_lyr<NEONET_PACKET_LAYERS_NUM;++i_lyr){
ret = neoNet_prepRead(&dev, &pack_in, i_lyr);
if(ret != 0){ break; }
}
if(ret < 0){ neoNet_printf("err:%02x\r\n", -ret); continue; }
neoNet_printf("type0:"); switch(pack_in.type[0]){case ETH: neoNet_printf("ETH\r\n"); break;}
neoNet_printf("type1:");switch(pack_in.type[1]){case ARP: neoNet_printf("ARP\r\n"); break; case IP4: neoNet_printf("IP4\r\n"); break;}
neoNet_printf("type2:");switch(pack_in.type[2]){case ICMP: neoNet_printf("ICMP\r\n"); break; case IGMP: neoNet_printf("IGMP\r\n"); break; case TCP: neoNet_printf("TCP\r\n"); break; case UDP: neoNet_printf("UDP\r\n"); break;}
//neoNet_printf("type3:");switch(pack.type3){case HTTP: neoNet_printf("HTTP\r\n"); break; case RTP: neoNet_printf("RTP\r\n"); break;}
//ret = neoNet_prepRead3(&dev, &pack);
//if(ret < 0){ neoNet_printf("err20:%02x\r\n", -ret); continue; }
// == Synthesize the response ==
ret = neoNet_prepResp(&dev, &pack_in, &pack_out);
if(ret == 0){ continue; } // no resp needed
if(ret < 0){ neoNet_printf("err:%02x\r\n", -ret); continue; }
ret = neoNet_prepResp0(&dev, &pack);
if(ret < 0){ neoNet_printf("err3:%02x\r\n", -ret); continue; }
ret = neoNet_prepResp1(&dev, &pack);
if(ret < 0){ neoNet_printf("err4:%02x\r\n", -ret); continue; }
ret = neoNet_prepResp2(&dev, &pack);
if(ret < 0){ neoNet_printf("err5:%02x\r\n", -ret); continue; }
// == PrepSend ethFr_out ==
for(uint8_t i_lyr=NEONET_PACKET_LAYERS_NUM-1;i_lyr!=255;--i_lyr){
ret = neoNet_prepSend(&dev, &pack_out, i_lyr);
if(ret != 0){ break; }
}
if(ret < 0){ neoNet_printf("err:%02x\r\n", -ret); continue; }
ret = neoNet_prepSend2(&dev, &pack);
if(ret < 0){ neoNet_printf("err6:%02x\r\n", -ret); continue; }
ret = neoNet_prepSend1(&dev, &pack);
if(ret < 0){ neoNet_printf("err7:%02x\r\n", -ret); continue; }
ret = neoNet_prepSend0(&dev, &pack);
if(ret < 0){ neoNet_printf("err8:%02x\r\n", -ret); continue; }
//ENC28J60_TransmitFrame(pack.data0, ret);
ENC28J60_TransmitFrame(pack.data0, ret);
ENC28J60_TransmitFrame(pack_out.data[0], pack_out.len[0]);
//HAL_Delay(500);

View File

@ -5,7 +5,15 @@
#include "lib_neoNet_packet.h"
int16_t neoNet_prepRead0(neoNet_utils_DevInfo* in_dev, neoNet_Packet* inout_packet);
int16_t neoNet_prepRead(neoNet_utils_DevInfo* in_dev, neoNet_Packet* in_pack, uint8_t in_lyr);
int16_t neoNet_prepResp(neoNet_utils_DevInfo* in_dev, neoNet_Packet* in_pack, neoNet_Packet* out_pack);
int16_t neoNet_prepSend(neoNet_utils_DevInfo* in_dev, neoNet_Packet* out_pack, uint8_t in_lyr);
/*int16_t neoNet_prepRead0(neoNet_utils_DevInfo* in_dev, neoNet_Packet* inout_packet);
int16_t neoNet_prepRead1(neoNet_utils_DevInfo* in_dev, neoNet_Packet* inout_packet);
int16_t neoNet_prepRead2(neoNet_utils_DevInfo* in_dev, neoNet_Packet* inout_packet);
/////////////////////////////////////
@ -20,5 +28,6 @@ int16_t neoNet_prepSend2(neoNet_utils_DevInfo* in_dev, neoNet_Packet* inout_pack
int16_t neoNet_prepSend1(neoNet_utils_DevInfo* in_dev, neoNet_Packet* inout_packet);
int16_t neoNet_prepSend0(neoNet_utils_DevInfo* in_dev, neoNet_Packet* inout_packet);
// neoNet_prepSend0 returns the length of the resulting message, which can be found in the original buffer
*/
#endif

View File

@ -2,44 +2,47 @@
#define LIB_NEONET_PACKET_H
typedef enum {
ETH
} neoNet_PacketType0;
#define NEONET_PACKET_LAYERS_NUM 4 // 4 is the minimum for handling ICMP/TCP/UDP - it's num of used prot layers +1 to account for NOPROT payload of the last protocol
typedef enum {
NOPROT, // clear, text payload delivered by the previous protocol or an unused field
ETH,
ARP,
IP4,
} neoNet_PacketType1;
typedef enum {
ICMP,
IGMP,
TCP,
UDP
} neoNet_PacketType2;
UDP,
typedef enum {
HTTP,
RTP
} neoNet_PacketType3;
} neoNet_FrameType;
typedef enum {
ETH_ARP_REQ,
ETH_ARP_RSP,
ETH_IP_ICMP_REQ,
ETH_IP_ICMP_RSP,
ETH_IP_TCP_SYN,
ETH_IP_TCP_SYNACK,
ETH_IP_TCP_ACK,
ETH_IP_TCP_ACKPSH,
//ETH_IP_TCP_TXT,
ETH_IP_UDP_TXT,
} neoNet_MessageType;
// The first set of type,data*,len is always for the base eth frame
// During every prepRead you EITHER fill the next type,data*,len and return 0
// OR you fill msgType,payload*,payloadLen and return payloadLen+1 !!!
typedef struct {
neoNet_PacketType0 type0;
uint8_t* data0;
uint16_t len0;
neoNet_PacketType1 type1;
uint8_t* data1;
uint16_t len1;
neoNet_PacketType2 type2;
uint8_t* data2;
uint16_t len2;
neoNet_PacketType3 type3;
uint8_t* data3;
uint16_t len3;
neoNet_FrameType type[NEONET_PACKET_LAYERS_NUM];
uint8_t* data[NEONET_PACKET_LAYERS_NUM];
uint16_t len[NEONET_PACKET_LAYERS_NUM];
neoNet_MessageType msgType;
uint8_t* payload;
uint16_t payloadLen;
} neoNet_Packet;

View File

@ -2,6 +2,7 @@
#define LIB_NEONET_PROT_ARP_H
#include "lib_neoNet_utils.h"
#include "lib_neoNet_packet.h"
#define NEONET_P_ARP_CONST_OPER_REQ 1
@ -23,10 +24,10 @@ typedef struct {
} neoNet_P_ARP_Frame;
int32_t neoNet_P_ARP_prepRead(neoNet_utils_DevInfo* in_dev, neoNet_P_ARP_Frame* in_fr, uint16_t in_fr_len);
int32_t neoNet_P_ARP_prepRead(neoNet_utils_DevInfo* in_dev, neoNet_Packet* in_pack, uint8_t in_lyr);
int16_t neoNet_P_ARP_prepResp(neoNet_utils_DevInfo* in_dev, neoNet_P_ARP_Frame* in_fr, neoNet_P_ARP_Frame* out_fr);
int16_t neoNet_P_ARP_prepResp(neoNet_utils_DevInfo* in_dev, neoNet_Packet* in_pack, uint8_t in_lyr, neoNet_Packet* out_pack, uint8_t out_lyr);
int16_t neoNet_P_ARP_prepSend(neoNet_utils_DevInfo* in_dev, neoNet_P_ARP_Frame* out_fr, uint16_t out_fr_dataLen);
int16_t neoNet_P_ARP_prepSend(neoNet_utils_DevInfo* in_dev, neoNet_Packet* out_pack, uint8_t out_lyr);
#endif

View File

@ -2,6 +2,7 @@
#define LIB_NEONET_PROT_ICMP_H
#include "lib_neoNet_utils.h"
#include "lib_neoNet_packet.h"
#define NEONET_P_ARP_CONST_MSGTYPE_ECHO_RSP 0
@ -24,10 +25,10 @@ typedef struct {
} neoNet_P_ICMP_Frame_msgOpts_echo;
int32_t neoNet_P_ICMP_prepRead(neoNet_utils_DevInfo* in_dev, neoNet_P_ICMP_Frame* in_fr, uint16_t in_fr_len);
int32_t neoNet_P_ICMP_prepRead(neoNet_utils_DevInfo* in_dev, neoNet_Packet* in_pack, uint8_t in_lyr);
int16_t neoNet_P_ICMP_prepResp(neoNet_utils_DevInfo* in_dev, neoNet_P_ICMP_Frame* in_fr, neoNet_P_ICMP_Frame* out_fr);
int16_t neoNet_P_ICMP_prepResp(neoNet_utils_DevInfo* in_dev, neoNet_Packet* in_pack, uint8_t in_lyr, neoNet_Packet* out_pack, uint8_t out_lyr);
int16_t neoNet_P_ICMP_prepSend(neoNet_utils_DevInfo* in_dev, neoNet_P_ICMP_Frame* out_fr, uint16_t out_fr_dataLen);
int16_t neoNet_P_ICMP_prepSend(neoNet_utils_DevInfo* in_dev, neoNet_Packet* out_pack, uint8_t out_lyr);
#endif

View File

@ -2,6 +2,7 @@
#define LIB_NEONET_PROT_IP
#include "lib_neoNet_utils.h"
#include "lib_neoNet_packet.h"
#define NEONET_P_IP_CONST_PROT_ICMP 1
@ -54,12 +55,12 @@ typedef struct {
// check header etc.
// rets int32, because uint16 must fit in the positive vals
int32_t neoNet_P_IP_prepRead(neoNet_utils_DevInfo* in_dev, neoNet_P_IP_Frame* in_fr, uint16_t in_fr_len);
int32_t neoNet_P_IP_prepRead(neoNet_utils_DevInfo* in_dev, neoNet_Packet* in_pack, uint8_t in_lyr);
// prepare response based on the request
int16_t neoNet_P_IP_prepResp(neoNet_utils_DevInfo* in_dev, neoNet_P_IP_Frame* in_fr, neoNet_P_IP_Frame* out_fr);
int16_t neoNet_P_IP_prepResp(neoNet_utils_DevInfo* in_dev, neoNet_Packet* in_pack, uint8_t in_lyr, neoNet_Packet* out_pack, uint8_t out_lyr);
// calc checksums etc.
int16_t neoNet_P_IP_prepSend(neoNet_utils_DevInfo* in_dev, neoNet_P_IP_Frame* out_fr, uint16_t out_fr_dataLen);
int16_t neoNet_P_IP_prepSend(neoNet_utils_DevInfo* in_dev, neoNet_Packet* out_pack, uint8_t out_lyr);
#endif

View File

@ -2,6 +2,7 @@
#define LIB_NEONET_PROT_TCP_H
#include "lib_neoNet_utils.h"
#include "lib_neoNet_packet.h"
#include "lib_neoNet_IPpseudoHeader.h"
@ -45,10 +46,10 @@ typedef struct {
#define neoNet_P_TCP_frame_DATAPTR(IN_FRAM) (((IN_FRAM)->data)+(((uint16_t)(neoNet_P_TCP_frame_GET_dataOffset(IN_FRAM)))*4 - 20))
int32_t neoNet_P_TCP_prepRead(neoNet_utils_DevInfo* in_dev, neoNet_IPpseudoHeader* in_pHdr, neoNet_P_TCP_Frame* in_fr, uint16_t in_fr_len);
int32_t neoNet_P_TCP_prepRead(neoNet_utils_DevInfo* in_dev, neoNet_Packet* in_pack, uint8_t in_lyr);
int16_t neoNet_P_TCP_prepResp(neoNet_utils_DevInfo* in_dev, neoNet_P_TCP_Frame* in_fr, uint16_t in_fr_len, neoNet_P_TCP_Frame* out_fr);
int16_t neoNet_P_TCP_prepResp(neoNet_utils_DevInfo* in_dev, neoNet_Packet* in_pack, uint8_t in_lyr, neoNet_Packet* out_pack, uint8_t out_lyr);
int16_t neoNet_P_TCP_prepSend(neoNet_utils_DevInfo* in_dev, neoNet_IPpseudoHeader* in_pHdr, neoNet_P_TCP_Frame* out_fr, uint16_t out_fr_dataLen);
int16_t neoNet_P_TCP_prepSend(neoNet_utils_DevInfo* in_dev, neoNet_Packet* out_pack, uint8_t out_lyr);
#endif

View File

@ -2,6 +2,7 @@
#define LIB_NEONET_PROT_UDP
#include "lib_neoNet_utils.h"
#include "lib_neoNet_packet.h"
#include "lib_neoNet_IPpseudoHeader.h"
@ -17,10 +18,10 @@ typedef struct {
} neoNet_P_UDP_Frame;
int32_t neoNet_P_UDP_prepRead(neoNet_utils_DevInfo* in_dev, neoNet_IPpseudoHeader* in_pHdr, neoNet_P_UDP_Frame* in_fr, uint16_t in_fr_len);
int32_t neoNet_P_UDP_prepRead(neoNet_utils_DevInfo* in_dev, neoNet_Packet* in_pack, uint8_t in_lyr);
int32_t neoNet_P_UDP_prepResp(neoNet_utils_DevInfo* in_dev, neoNet_P_UDP_Frame* in_fr, neoNet_P_UDP_Frame* out_fr);
int32_t neoNet_P_UDP_prepResp(neoNet_utils_DevInfo* in_dev, neoNet_Packet* in_pack, uint8_t in_lyr, neoNet_Packet* out_pack, uint8_t out_lyr);
int32_t neoNet_P_UDP_prepSend(neoNet_utils_DevInfo* in_dev, neoNet_IPpseudoHeader* in_pHdr, neoNet_P_UDP_Frame* out_fr, uint16_t out_fr_dataLen);
int32_t neoNet_P_UDP_prepSend(neoNet_utils_DevInfo* in_dev, neoNet_Packet* out_pack, uint8_t out_lyr);
#endif

View File

@ -2,6 +2,7 @@
#define LIB_NEONET_PROT_ETH_H
#include "lib_neoNet_utils.h"
#include "lib_neoNet_packet.h"
#define NEONET_P_ETH_CONST_ETHERTYPE_IP4 0x0800
@ -17,10 +18,10 @@ typedef struct {
} neoNet_P_eth_Frame;
int32_t neoNet_P_eth_prepRead(neoNet_utils_DevInfo* in_dev, neoNet_P_eth_Frame* in_fr, uint16_t in_fr_len);
int32_t neoNet_P_eth_prepRead(neoNet_utils_DevInfo* in_dev, neoNet_Packet* in_pack, uint8_t in_lyr);
int16_t neoNet_P_eth_prepResp(neoNet_utils_DevInfo* in_dev, neoNet_P_eth_Frame* in_fr, neoNet_P_eth_Frame* out_fr);
int16_t neoNet_P_eth_prepResp(neoNet_utils_DevInfo* in_dev, neoNet_Packet* in_pack, uint8_t in_lyr, neoNet_Packet* out_pack, uint8_t out_lyr);
int16_t neoNet_P_eth_prepSend(neoNet_utils_DevInfo* in_dev, neoNet_P_eth_Frame* out_fr, uint16_t out_fr_dataLen);
int16_t neoNet_P_eth_prepSend(neoNet_utils_DevInfo* in_dev, neoNet_Packet* out_pack, uint8_t out_lyr);
#endif

View File

@ -11,7 +11,207 @@
#include <stdio.h>
int16_t neoNet_prepRead0(neoNet_utils_DevInfo* in_dev, neoNet_Packet* inout_packet){
int16_t neoNet_prepRead(neoNet_utils_DevInfo* in_dev, neoNet_Packet* in_pack, uint8_t in_lyr){
switch(in_pack->type[in_lyr]){
case NOPROT:
return 1; // reached the end - payload
case ETH:
return neoNet_P_eth_prepRead(in_dev, in_pack, in_lyr);
case ARP:
return neoNet_P_ARP_prepRead(in_dev, in_pack, in_lyr);
case IP4:
return neoNet_P_IP_prepRead(in_dev, in_pack, in_lyr);
case ICMP:
return neoNet_P_ICMP_prepRead(in_dev, in_pack, in_lyr);
case IGMP:
return -(NEONET_PROT_ROOT_ERR_MASTER+1);
//return neoNet_P_IGMP_prepRead(in_dev, in_pack, in_lyr);
case TCP:
return neoNet_P_TCP_prepRead(in_dev, in_pack, in_lyr);
case UDP:
return neoNet_P_UDP_prepRead(in_dev, in_pack, in_lyr);
default:
return -(NEONET_PROT_ROOT_ERR_MASTER+1);
}
}
int16_t neoNet_prepResp(neoNet_utils_DevInfo* in_dev, neoNet_Packet* in_pack, neoNet_Packet* out_pack){
static int32_t ret;
static uint32_t t_seqAckNo;
neoNet_P_ARP_Frame* out_fr_ARP;
neoNet_P_ICMP_Frame* in_fr_ICMP;
neoNet_P_ICMP_Frame* out_fr_ICMP;
neoNet_P_TCP_Frame* in_fr_TCP;
neoNet_P_TCP_Frame* out_fr_TCP;
switch(in_pack->msgType){
case ETH_ARP_REQ:
ret = neoNet_P_eth_prepResp(in_dev, in_pack, 0, out_pack, 0);
ret = neoNet_P_ARP_prepResp(in_dev, in_pack, 1, out_pack, 1);
out_fr_ARP = (neoNet_P_ARP_Frame*)(out_pack->data[1]);
out_fr_ARP->operId16b = NEONET_P_ARP_CONST_OPER_RSP;
out_pack->msgType = ETH_ARP_RSP;
out_pack->payload = NULL;
out_pack->payloadLen = 0;
return out_pack->payloadLen+1;
break;
case ETH_ARP_RSP:
return 0;
break;
case ETH_IP_ICMP_REQ:
ret = neoNet_P_eth_prepResp(in_dev, in_pack, 0, out_pack, 0);
ret = neoNet_P_IP_prepResp(in_dev, in_pack, 1, out_pack, 1);
ret = neoNet_P_ICMP_prepResp(in_dev, in_pack, 2, out_pack, 2);
in_fr_ICMP = (neoNet_P_ICMP_Frame*)(in_pack->data[2]);
out_fr_ICMP = (neoNet_P_ICMP_Frame*)(out_pack->data[2]);
out_fr_ICMP->msgType8b = NEONET_P_ARP_CONST_MSGTYPE_ECHO_RSP;
out_fr_ICMP->msgCode8b = NEONET_P_ARP_CONST_MSGCODE_ECHO_RSP;
if(out_fr_ICMP->msgOpts32b != in_fr_ICMP->msgOpts32b){ memcpy(out_fr_ICMP->msgOpts32b, in_fr_ICMP->msgOpts32b, 4); }
out_pack->msgType = ETH_IP_ICMP_RSP;
out_pack->payload = NULL;
out_pack->payloadLen = 0;
return out_pack->payloadLen+1;
break;
case ETH_IP_ICMP_RSP:
return 0;
break;
case ETH_IP_TCP_SYN:
ret = neoNet_P_eth_prepResp(in_dev, in_pack, 0, out_pack, 0);
ret = neoNet_P_IP_prepResp(in_dev, in_pack, 1, out_pack, 1);
ret = neoNet_P_TCP_prepResp(in_dev, in_pack, 2, out_pack, 2);
in_fr_TCP = (neoNet_P_TCP_Frame*)(in_pack->data[2]);
out_fr_TCP = (neoNet_P_TCP_Frame*)(out_pack->data[2]);
neoNet_P_TCP_frame_SET_flag(out_fr_TCP, NEONET_P_TCP_CONST_FLAG_SYN, 1);
neoNet_P_TCP_frame_SET_flag(out_fr_TCP, NEONET_P_TCP_CONST_FLAG_ACK, 1);
out_fr_TCP->ackNo32b = in_fr_TCP->seqNo32b + 1;
out_fr_TCP->seqNo32b = 0; // theoretically should be random
out_pack->msgType = ETH_IP_TCP_SYNACK;
out_pack->payload = NULL;
out_pack->payloadLen = 0;
return out_pack->payloadLen+1;
break;
case ETH_IP_TCP_SYNACK:
ret = neoNet_P_eth_prepResp(in_dev, in_pack, 0, out_pack, 0);
ret = neoNet_P_IP_prepResp(in_dev, in_pack, 1, out_pack, 1);
ret = neoNet_P_TCP_prepResp(in_dev, in_pack, 2, out_pack, 2);
in_fr_TCP = (neoNet_P_TCP_Frame*)(in_pack->data[2]);
out_fr_TCP = (neoNet_P_TCP_Frame*)(out_pack->data[2]);
neoNet_P_TCP_frame_SET_flag(out_fr_TCP, NEONET_P_TCP_CONST_FLAG_SYN, 0);
neoNet_P_TCP_frame_SET_flag(out_fr_TCP, NEONET_P_TCP_CONST_FLAG_ACK, 1);
t_seqAckNo = in_fr_TCP->ackNo32b;
out_fr_TCP->ackNo32b = in_fr_TCP->seqNo32b + 1;
out_fr_TCP->seqNo32b = t_seqAckNo;
out_pack->msgType = ETH_IP_TCP_ACK;
out_pack->payload = NULL;
out_pack->payloadLen = 0;
return out_pack->payloadLen+1;
break;
case ETH_IP_TCP_ACK:
return 0;
break;
case ETH_IP_TCP_ACKPSH:
ret = neoNet_P_eth_prepResp(in_dev, in_pack, 0, out_pack, 0);
ret = neoNet_P_IP_prepResp(in_dev, in_pack, 1, out_pack, 1);
ret = neoNet_P_TCP_prepResp(in_dev, in_pack, 2, out_pack, 2);
in_fr_TCP = (neoNet_P_TCP_Frame*)(in_pack->data[2]);
out_fr_TCP = (neoNet_P_TCP_Frame*)(out_pack->data[2]);
neoNet_P_TCP_frame_SET_flag(out_fr_TCP, NEONET_P_TCP_CONST_FLAG_SYN, 0);
neoNet_P_TCP_frame_SET_flag(out_fr_TCP, NEONET_P_TCP_CONST_FLAG_ACK, 1);
neoNet_P_TCP_frame_SET_flag(out_fr_TCP, NEONET_P_TCP_CONST_FLAG_PSH, 0);
t_seqAckNo = in_fr_TCP->ackNo32b;
out_fr_TCP->ackNo32b = in_fr_TCP->seqNo32b + in_pack->payloadLen; // NOTE: if TCP if implementation changes - this line might need to be changed to + in_pack->len[3]
out_fr_TCP->seqNo32b = t_seqAckNo;
out_pack->msgType = ETH_IP_TCP_ACK;
out_pack->payload = NULL;
out_pack->payloadLen = 0;
return out_pack->payloadLen+1;
break;
/*case ETH_IP_TCP_TXT:
ret = neoNet_P__prepResp(in_dev, in_pack, out_pack);
return 1;
break;*/
case ETH_IP_UDP_TXT:
return 0;
break;
default:
return -(NEONET_PROT_ROOT_ERR_MASTER+1);
}
}
int16_t neoNet_prepSend(neoNet_utils_DevInfo* in_dev, neoNet_Packet* out_pack, uint8_t in_lyr){
// ret:
// <0 -- err
// =0 -- continue
// >0 -- halt, ready to send
switch(out_pack->type[in_lyr]){
case NOPROT:
return 0; // nothing to do
case ETH:
return neoNet_P_eth_prepSend(in_dev, out_pack, in_lyr);
case ARP:
return neoNet_P_ARP_prepSend(in_dev, out_pack, in_lyr);
case IP4:
return neoNet_P_IP_prepSend(in_dev, out_pack, in_lyr);
case ICMP:
return neoNet_P_ICMP_prepSend(in_dev, out_pack, in_lyr);
case IGMP:
return -(NEONET_PROT_ROOT_ERR_MASTER+1);
//return neoNet_P_IGMP_prepSend(in_dev, out_pack, in_lyr);
case TCP:
return neoNet_P_TCP_prepSend(in_dev, out_pack, in_lyr);
case UDP:
return neoNet_P_UDP_prepSend(in_dev, out_pack, in_lyr);
default:
return -(NEONET_PROT_ROOT_ERR_MASTER+1);
}
}
/*int16_t neoNet_prepRead0(neoNet_utils_DevInfo* in_dev, neoNet_Packet* inout_packet){
int32_t ret;
switch(inout_packet->type0){
@ -377,4 +577,4 @@ int16_t neoNet_prepSend0(neoNet_utils_DevInfo* in_dev, neoNet_Packet* inout_pack
default:
return -(NEONET_PROT_ROOT_ERR_MASTER+20);
}
}
}*/

View File

@ -3,8 +3,10 @@
#include <stdio.h>
int32_t neoNet_P_ARP_prepRead(neoNet_utils_DevInfo* in_dev, neoNet_P_ARP_Frame* in_fr, uint16_t in_fr_len){
if(in_fr_len < 28){ return -(NEONET_PROT_ARP_ERR_MASTER+1); }
int32_t neoNet_P_ARP_prepRead(neoNet_utils_DevInfo* in_dev, neoNet_Packet* in_pack, uint8_t in_lyr){
neoNet_P_ARP_Frame* in_fr = (neoNet_P_ARP_Frame*)(in_pack->data[in_lyr]);
if(in_pack->len[in_lyr] < 28){ return -(NEONET_PROT_ARP_ERR_MASTER+1); }
neoNet_printf("dstAddr:%d.%d.%d.%d\r\n",((uint8_t*)in_fr->dstPAddr32b)[0],((uint8_t*)in_fr->dstPAddr32b)[1],((uint8_t*)in_fr->dstPAddr32b)[2],((uint8_t*)in_fr->dstPAddr32b)[3]);
if(memcmp(in_fr->dstPAddr32b, in_dev->ipAddr, 4) != 0){ return -(NEONET_PROT_ARP_ERR_MASTER+2); }
@ -17,29 +19,64 @@ int32_t neoNet_P_ARP_prepRead(neoNet_utils_DevInfo* in_dev, neoNet_P_ARP_Frame*
if(in_fr->pType16b != NEONET_P_ARP_CONST_PTYP_IP4){ return -(NEONET_PROT_ARP_ERR_MASTER+4); }
if(in_fr->hLen8b != 6){ return -(NEONET_PROT_ARP_ERR_MASTER+5); }
if(in_fr->pLen8b != 4){ return -(NEONET_PROT_ARP_ERR_MASTER+6); }
if(in_fr->operId16b != NEONET_P_ARP_CONST_OPER_REQ){ return -(NEONET_PROT_ARP_ERR_MASTER+7); }
return 0;
/////////////////////////////////
switch(in_fr->operId16b){
case NEONET_P_ARP_CONST_OPER_REQ:
in_pack->msgType = ETH_ARP_REQ;
break;
case NEONET_P_ARP_CONST_OPER_RSP:
in_pack->msgType = ETH_ARP_RSP;
break;
default:
return -(NEONET_PROT_ARP_ERR_MASTER+7);
}
in_pack->payload = NULL;
in_pack->payloadLen = 0;
return in_pack->payloadLen+1;
}
int16_t neoNet_P_ARP_prepResp(neoNet_utils_DevInfo* in_dev, neoNet_P_ARP_Frame* in_fr, neoNet_P_ARP_Frame* out_fr){
// NOTE: this func must work also if in_fr==out_fr
// NOTE: this func must not rely on the fr.data 's length
int16_t neoNet_P_ARP_prepResp(neoNet_utils_DevInfo* in_dev, neoNet_Packet* in_pack, uint8_t in_lyr, neoNet_Packet* out_pack, uint8_t out_lyr){
// NOTE: this func must not rely on the fr.data 's length???
// in_pack and out_pack must not point to the same buffer
if(out_fr != in_fr){ memcpy(out_fr, in_fr, 6); }
out_fr->operId16b = NEONET_P_ARP_CONST_OPER_RSP;
if(out_fr->dstHAddr48b != in_fr->srcHAddr48b){ memcpy(out_fr->dstHAddr48b, in_fr->srcHAddr48b, 6); }
if(out_fr->dstPAddr32b != in_fr->srcPAddr32b){ memcpy(out_fr->dstPAddr32b, in_fr->srcPAddr32b, 4); }
neoNet_P_ARP_Frame* in_fr = (neoNet_P_ARP_Frame*)(in_pack->data[in_lyr]);
neoNet_P_ARP_Frame* out_fr = (neoNet_P_ARP_Frame*)(out_pack->data[out_lyr]);
memcpy(out_fr, in_fr, 6);
out_fr->operId16b = in_fr->operId16b;
memcpy(out_fr->dstHAddr48b, in_fr->srcHAddr48b, 6);
memcpy(out_fr->dstPAddr32b, in_fr->srcPAddr32b, 4);
memcpy(out_fr->srcHAddr48b, in_dev->macAddr, 6);
memcpy(out_fr->srcPAddr32b, in_dev->ipAddr, 4);
out_pack->type[out_lyr] = ARP;
out_pack->len[out_lyr] = 0;
/*for(uint8_t i_lyr=0;i_lyr<=out_lyr;++i_lyr){
out_pack->len[i_lyr] += 28;
}*/
out_pack->type[out_lyr+1] = NOPROT;
out_pack->data[out_lyr+1] = NULL;
out_pack->len[out_lyr+1] = 0;
return 0;
}
int16_t neoNet_P_ARP_prepSend(neoNet_utils_DevInfo* in_dev, neoNet_P_ARP_Frame* out_fr, uint16_t out_fr_dataLen){
int16_t neoNet_P_ARP_prepSend(neoNet_utils_DevInfo* in_dev, neoNet_Packet* out_pack, uint8_t out_lyr){
neoNet_P_ARP_Frame* out_fr = (neoNet_P_ARP_Frame*)(out_pack->data[out_lyr]);
out_fr->hType16b = htons(out_fr->hType16b);
out_fr->pType16b = htons(out_fr->pType16b);
out_fr->operId16b = htons(out_fr->operId16b);
return out_fr_dataLen + 28;
out_pack->len[out_lyr] = out_pack->len[out_lyr+1] + 28;
return 0;
}

View File

@ -1,42 +1,70 @@
#include "lib_neoNet_prot_ICMP.h"
int32_t neoNet_P_ICMP_prepRead(neoNet_utils_DevInfo* in_dev, neoNet_P_ICMP_Frame* in_fr, uint16_t in_fr_len){
if(in_fr_len < 8){ return -(NEONET_PROT_ICMP_ERR_MASTER+1); }
int32_t neoNet_P_ICMP_prepRead(neoNet_utils_DevInfo* in_dev, neoNet_Packet* in_pack, uint8_t in_lyr){
neoNet_P_ICMP_Frame* in_fr = (neoNet_P_ICMP_Frame*)(in_pack->data[in_lyr]);
if(neoNet_utils_calcChecksum((uint8_t*)in_fr, in_fr_len) != 0){ return -(NEONET_PROT_ICMP_ERR_MASTER+2); }
if(in_pack->len[in_lyr] < 8){ return -(NEONET_PROT_ICMP_ERR_MASTER+1); }
if(neoNet_utils_calcChecksum((uint8_t*)in_fr, in_pack->len[in_lyr]) != 0){ return -(NEONET_PROT_ICMP_ERR_MASTER+2); }
/////////////////////////////////
switch(in_fr->msgType8b){
case NEONET_P_ARP_CONST_MSGTYPE_ECHO_REQ:
if(in_fr->msgCode8b != NEONET_P_ARP_CONST_MSGCODE_ECHO_REQ){ return -(NEONET_PROT_ICMP_ERR_MASTER+3); }
in_pack->msgType = ETH_IP_ICMP_REQ;
break;
case NEONET_P_ARP_CONST_MSGTYPE_ECHO_RSP:
if(in_fr->msgCode8b != NEONET_P_ARP_CONST_MSGCODE_ECHO_RSP){ return -(NEONET_PROT_ICMP_ERR_MASTER+3); }
in_pack->msgType = ETH_IP_ICMP_RSP;
break;
default:
return -(NEONET_PROT_ICMP_ERR_MASTER+4);
}
return in_fr_len-8;
in_pack->payload = in_fr->data;
in_pack->payloadLen = in_pack->len[in_lyr]-8;
return in_pack->payloadLen+1;
}
int16_t neoNet_P_ICMP_prepResp(neoNet_utils_DevInfo* in_dev, neoNet_P_ICMP_Frame* in_fr, neoNet_P_ICMP_Frame* out_fr){
// NOTE: this func must work also if in_fr==out_fr
int16_t neoNet_P_ICMP_prepResp(neoNet_utils_DevInfo* in_dev, neoNet_Packet* in_pack, uint8_t in_lyr, neoNet_Packet* out_pack, uint8_t out_lyr){
// NOTE: this func must not rely on the fr.data 's length
// in_pack and out_pack must not point to the same buffer
neoNet_P_ICMP_Frame* in_fr = (neoNet_P_ICMP_Frame*)(in_pack->data[in_lyr]);
neoNet_P_ICMP_Frame* out_fr = (neoNet_P_ICMP_Frame*)(out_pack->data[out_lyr]);
switch(in_fr->msgType8b){
case NEONET_P_ARP_CONST_MSGTYPE_ECHO_REQ:
out_fr->msgType8b = NEONET_P_ARP_CONST_MSGTYPE_ECHO_RSP;
out_fr->msgCode8b = NEONET_P_ARP_CONST_MSGCODE_ECHO_RSP;
if(out_fr->msgOpts32b != in_fr->msgOpts32b){ memcpy(out_fr->msgOpts32b, in_fr->msgOpts32b, 4); }
break;
default:
return -(NEONET_PROT_ICMP_ERR_MASTER+5);
}
}
int16_t neoNet_P_ICMP_prepSend(neoNet_utils_DevInfo* in_dev, neoNet_P_ICMP_Frame* out_fr, uint16_t out_fr_dataLen){
out_fr->msgType8b = in_fr->msgType8b;
out_fr->msgCode8b = in_fr->msgCode8b;
out_fr->wholeFrameChksm16b = 0;
out_fr->wholeFrameChksm16b = neoNet_utils_calcChecksum((uint8_t*)out_fr, out_fr_dataLen+8);
memcpy(out_fr->msgOpts32b, in_fr->msgOpts32b, 4);
memcpy(out_fr->data, in_fr->data, in_pack->len[in_lyr]-8); // NOTE: the payload is copied, but doesn't have to be used
return out_fr_dataLen + 8;
out_pack->type[out_lyr] = ICMP;
out_pack->len[out_lyr] = 0;
/*for(uint8_t i_lyr=0;i_lyr<=out_lyr;++i_lyr){
out_pack->len[i_lyr] += 8;
}*/
out_pack->type[out_lyr+1] = NOPROT;
out_pack->data[out_lyr+1] = out_fr->data;
out_pack->len[out_lyr+1] = in_pack->len[in_lyr]-8;
return 0;
}
int16_t neoNet_P_ICMP_prepSend(neoNet_utils_DevInfo* in_dev, neoNet_Packet* out_pack, uint8_t out_lyr){
neoNet_P_ICMP_Frame* out_fr = (neoNet_P_ICMP_Frame*)(out_pack->data[out_lyr]);
out_fr->wholeFrameChksm16b = 0;
out_fr->wholeFrameChksm16b = neoNet_utils_calcChecksum((uint8_t*)out_fr, out_pack->len[out_lyr+1]+8);
out_pack->len[out_lyr] = out_pack->len[out_lyr+1] + 8;
return 0;
}

View File

@ -1,48 +1,84 @@
#include "lib_neoNet_prot_IP.h"
#include <string.h>
#include <stdio.h>
int32_t neoNet_P_IP_prepRead(neoNet_utils_DevInfo* in_dev, neoNet_P_IP_Frame* in_fr, uint16_t in_fr_len){
int32_t neoNet_P_IP_prepRead(neoNet_utils_DevInfo* in_dev, neoNet_Packet* in_pack, uint8_t in_lyr){
neoNet_P_IP_Frame* in_fr = (neoNet_P_IP_Frame*)(in_pack->data[in_lyr]);
// NOTE: in_fr_len must c <0; INT16_MAX>
if(in_fr_len < 20){ return -(NEONET_PROT_IP_ERR_MASTER+1); } // TODO: prep a distinct ret code
if(in_pack->len[in_lyr] < 20){ return -(NEONET_PROT_IP_ERR_MASTER+1); } // TODO: prep a distinct ret code
if(in_fr_len < ((uint16_t)neoNet_P_IP_frame_GET_intntHdrLen(in_fr))*4){ return -(NEONET_PROT_IP_ERR_MASTER+2); } // TODO: prep a distinct ret code
if(in_pack->len[in_lyr] < ((uint16_t)neoNet_P_IP_frame_GET_intntHdrLen(in_fr))*4){ return -(NEONET_PROT_IP_ERR_MASTER+2); } // TODO: prep a distinct ret code
// NOTE: if the options fields are detected you may need to byte-swap them - that depends on what opts are passed
//neoNet_printf("dstAddr:%d.%d.%d.%d\r\n",((uint8_t*)in_fr->dstAddr32b)[0],((uint8_t*)in_fr->dstAddr32b)[1],((uint8_t*)in_fr->dstAddr32b)[2],((uint8_t*)in_fr->dstAddr32b)[3]);
if(memcmp(&in_fr->dstAddr32b, in_dev->ipAddr, 4) != 0){ return -(NEONET_PROT_IP_ERR_MASTER+3); } // TODO: prep a distinct ret code
neoNet_printf("dstAddr:%d.%d.%d.%d\r\n",((uint8_t*)in_fr->dstAddr32b)[0],((uint8_t*)in_fr->dstAddr32b)[1],((uint8_t*)in_fr->dstAddr32b)[2],((uint8_t*)in_fr->dstAddr32b)[3]);
if(memcmp(&in_fr->dstAddr32b, in_dev->ipAddr, 4) != 0){ return -(NEONET_PROT_IP_ERR_MASTER+3); } // WARNING: this prevents multicast !!
if(neoNet_utils_calcChecksum((uint8_t*) in_fr, ((uint16_t)neoNet_P_IP_frame_GET_intntHdrLen(in_fr))*4) != 0){ return -(NEONET_PROT_IP_ERR_MASTER+4); } // TODO: prep a distinct ret code
if(neoNet_utils_calcChecksum((uint8_t*)in_fr, ((uint16_t)neoNet_P_IP_frame_GET_intntHdrLen(in_fr))*4) != 0){ return -(NEONET_PROT_IP_ERR_MASTER+4); } // TODO: prep a distinct ret code
in_fr->wholeFrameLenBytes16b = ntohs(in_fr->wholeFrameLenBytes16b);
in_fr->fragmId16b = ntohs(in_fr->fragmId16b);
in_fr->fragmFlags3b_fragmOffset13b = ntohs(in_fr->fragmFlags3b_fragmOffset13b);
//in_fr->hdrChksm16b = ntohs(in_fr->hdrChksm16b); // actually we don't need this
//in_fr->srcAddr32b = ntohl(in_fr->srcAddr32b);
//in_fr->dstAddr32b = ntohl(in_fr->dstAddr32b);
return in_fr_len - (((uint16_t)neoNet_P_IP_frame_GET_intntHdrLen(in_fr))*4);
}
/////////////////////////////////
int16_t neoNet_P_IP_prepResp(neoNet_utils_DevInfo* in_dev, neoNet_P_IP_Frame* in_fr, neoNet_P_IP_Frame* out_fr){
// NOTE: this func must work also if in_fr==out_fr
// NOTE: this func must not rely on the fr.data 's length
switch(in_fr->prot8b){
case NEONET_P_IP_CONST_PROT_ICMP:
in_pack->type[in_lyr+1] = ICMP;
break;
if(out_fr != in_fr){ memcpy(out_fr, in_fr, 10); }
memcpy(&out_fr->dstAddr32b, &in_fr->srcAddr32b, 4);
memcpy(&out_fr->srcAddr32b, in_dev->ipAddr, 4);
neoNet_P_IP_frame_SET_intntHdrLen(out_fr, 5);
case NEONET_P_IP_CONST_PROT_IGMP:
in_pack->type[in_lyr+1] = IGMP;
break;
case NEONET_P_IP_CONST_PROT_TCP:
in_pack->type[in_lyr+1] = TCP;
break;
case NEONET_P_IP_CONST_PROT_UDP:
in_pack->type[in_lyr+1] = UDP;
break;
default:
return -(NEONET_PROT_ROOT_ERR_MASTER+3);
}
in_pack->data[in_lyr+1] = neoNet_P_IP_frame_DATAPTR(in_fr);
in_pack->len[in_lyr+1] = in_pack->len[in_lyr] - (((uint16_t)neoNet_P_IP_frame_GET_intntHdrLen(in_fr))*4);
return 0;
}
int16_t neoNet_P_IP_prepSend(neoNet_utils_DevInfo* in_dev, neoNet_P_IP_Frame* out_fr, uint16_t out_fr_dataLen){
out_fr->wholeFrameLenBytes16b = ((uint16_t)neoNet_P_IP_frame_GET_intntHdrLen(out_fr))*4 + out_fr_dataLen;
int16_t neoNet_P_IP_prepResp(neoNet_utils_DevInfo* in_dev, neoNet_Packet* in_pack, uint8_t in_lyr, neoNet_Packet* out_pack, uint8_t out_lyr){
// NOTE: this func must not rely on the fr.data 's length???
// in_pack and out_pack must not point to the same buffer
neoNet_P_IP_Frame* in_fr = (neoNet_P_IP_Frame*)(in_pack->data[in_lyr]);
neoNet_P_IP_Frame* out_fr = (neoNet_P_IP_Frame*)(out_pack->data[out_lyr]);
memcpy(out_fr, in_fr, 10);
// NOTE: you might want to change the fragmOffset
out_fr->hdrChksm16b = 0;
memcpy(&out_fr->dstAddr32b, &in_fr->srcAddr32b, 4);
memcpy(&out_fr->srcAddr32b, in_dev->ipAddr, 4);
neoNet_P_IP_frame_SET_intntHdrLen(out_fr, 5); // for now, here, we assume we don't neet the IPhdr options
out_pack->type[out_lyr] = IP4;
out_pack->len[out_lyr] = 0;
/*for(uint8_t i_lyr=0;i_lyr<=out_lyr;++i_lyr){
out_pack->len[i_lyr] += ((uint16_t)neoNet_P_IP_frame_GET_intntHdrLen(out_fr))*4;
}*/
out_pack->data[out_lyr+1] = neoNet_P_IP_frame_DATAPTR(out_fr);
return 0;
}
int16_t neoNet_P_IP_prepSend(neoNet_utils_DevInfo* in_dev, neoNet_Packet* out_pack, uint8_t out_lyr){
neoNet_P_IP_Frame* out_fr = (neoNet_P_IP_Frame*)(out_pack->data[out_lyr]);
out_fr->wholeFrameLenBytes16b = ((uint16_t)neoNet_P_IP_frame_GET_intntHdrLen(out_fr))*4 + out_pack->len[out_lyr+1];
out_fr->wholeFrameLenBytes16b = htons(out_fr->wholeFrameLenBytes16b);
out_fr->fragmId16b = htons(out_fr->fragmId16b);
@ -50,7 +86,10 @@ int16_t neoNet_P_IP_prepSend(neoNet_utils_DevInfo* in_dev, neoNet_P_IP_Frame* ou
//in_fr->srcAddr32b = htonl(in_fr->srcAddr32b);
//in_fr->dstAddr32b = htonl(in_fr->dstAddr32b);
out_fr->hdrChksm16b = 0;
out_fr->hdrChksm16b = neoNet_utils_calcChecksum((uint8_t*) out_fr, ((uint16_t)neoNet_P_IP_frame_GET_intntHdrLen(out_fr))*4);
return out_fr_dataLen + ((uint16_t)neoNet_P_IP_frame_GET_intntHdrLen(out_fr))*4;
out_pack->len[out_lyr] = out_pack->len[out_lyr+1] + ((uint16_t)neoNet_P_IP_frame_GET_intntHdrLen(out_fr))*4;
return 0;
}

View File

@ -2,12 +2,16 @@
#include <stdio.h>
int32_t neoNet_P_TCP_prepRead(neoNet_utils_DevInfo* in_dev, neoNet_IPpseudoHeader* in_pHdr, neoNet_P_TCP_Frame* in_fr, uint16_t in_fr_len){
if(in_fr_len < 20){ return -(NEONET_PROT_TCP_ERR_MASTER+1); }
int32_t neoNet_P_TCP_prepRead(neoNet_utils_DevInfo* in_dev, neoNet_Packet* in_pack, uint8_t in_lyr){
neoNet_P_TCP_Frame* in_fr = (neoNet_P_TCP_Frame*)(in_pack->data[in_lyr]);
static neoNet_IPpseudoHeader t_pHdr;
if(in_fr_len < (((uint16_t)(neoNet_P_TCP_frame_GET_dataOffset(in_fr)))*4)){ return -(NEONET_PROT_TCP_ERR_MASTER+2); }
if(in_pack->len[in_lyr] < 20){ return -(NEONET_PROT_TCP_ERR_MASTER+1); }
if(neoNet_IPpseudoHeader_calcChecksum(in_pHdr, (uint8_t*)in_fr, in_fr_len) != 0){ return -(NEONET_PROT_TCP_ERR_MASTER+3); }
if(in_pack->len[in_lyr] < (((uint16_t)(neoNet_P_TCP_frame_GET_dataOffset(in_fr)))*4)){ return -(NEONET_PROT_TCP_ERR_MASTER+2); }
neoNet_IPpseudoHeader_fromIPFrame((neoNet_P_IP_Frame*)(in_pack->data[in_lyr-1]), in_pack->len[in_lyr], &t_pHdr);
if(neoNet_IPpseudoHeader_calcChecksum(&t_pHdr, (uint8_t*)in_fr, in_pack->len[in_lyr]) != 0){ return -(NEONET_PROT_TCP_ERR_MASTER+3); }
in_fr->srcPort16b = ntohs(in_fr->srcPort16b);
in_fr->dstPort16b = ntohs(in_fr->dstPort16b);
@ -17,63 +21,80 @@ int32_t neoNet_P_TCP_prepRead(neoNet_utils_DevInfo* in_dev, neoNet_IPpseudoHeade
in_fr->rxWinSize16b = ntohs(in_fr->rxWinSize16b);
in_fr->urgentPointer16b = ntohs(in_fr->urgentPointer16b);
return in_fr_len-(((uint16_t)(neoNet_P_TCP_frame_GET_dataOffset(in_fr)))*4);
}
int16_t neoNet_P_TCP_prepResp(neoNet_utils_DevInfo* in_dev, neoNet_P_TCP_Frame* in_fr, uint16_t in_fr_len, neoNet_P_TCP_Frame* out_fr){
// \/--- it protects the data in case the two pointers are equal
static uint16_t t_port;
t_port = in_fr->srcPort16b;
out_fr->srcPort16b = in_fr->dstPort16b;
out_fr->dstPort16b = t_port;
static uint32_t t_seqAckNo;
for(int i=0;i<8;++i){
printf("flags.%d=%d\r\n", i, neoNet_P_TCP_frame_GET_flag(in_fr, i));
neoNet_printf("flags.%d=%d\r\n", i, neoNet_P_TCP_frame_GET_flag(in_fr, i));
}
/////////////////////////////////
if(neoNet_P_TCP_frame_GET_flag(in_fr, NEONET_P_TCP_CONST_FLAG_SYN)){
if(!neoNet_P_TCP_frame_GET_flag(in_fr, NEONET_P_TCP_CONST_FLAG_ACK)){
// SYN
printf("SYN\r\n");
neoNet_P_TCP_frame_SET_flag(out_fr, NEONET_P_TCP_CONST_FLAG_SYN, 1);
neoNet_P_TCP_frame_SET_flag(out_fr, NEONET_P_TCP_CONST_FLAG_ACK, 1);
out_fr->ackNo32b = in_fr->seqNo32b + 1;
out_fr->seqNo32b = 0;
in_pack->msgType = ETH_IP_TCP_SYN;
}else{
// SYN+ACK
printf("SYN+ACK\r\n");
neoNet_P_TCP_frame_SET_flag(out_fr, NEONET_P_TCP_CONST_FLAG_SYN, 0);
neoNet_P_TCP_frame_SET_flag(out_fr, NEONET_P_TCP_CONST_FLAG_ACK, 1);
t_seqAckNo = in_fr->ackNo32b;
out_fr->ackNo32b = in_fr->seqNo32b + 1;
out_fr->seqNo32b = t_seqAckNo;
in_pack->msgType = ETH_IP_TCP_SYNACK;
}
}else{
if(neoNet_P_TCP_frame_GET_flag(in_fr, NEONET_P_TCP_CONST_FLAG_ACK)){
// ACK
if(neoNet_P_TCP_frame_GET_flag(in_fr, NEONET_P_TCP_CONST_FLAG_PSH)){
printf("ACK+PSH\r\n");
neoNet_P_TCP_frame_SET_flag(out_fr, NEONET_P_TCP_CONST_FLAG_SYN, 0);
neoNet_P_TCP_frame_SET_flag(out_fr, NEONET_P_TCP_CONST_FLAG_ACK, 1);
neoNet_P_TCP_frame_SET_flag(out_fr, NEONET_P_TCP_CONST_FLAG_PSH, 0);
t_seqAckNo = in_fr->ackNo32b;
out_fr->ackNo32b = in_fr->seqNo32b + in_fr_len-(((uint16_t)(neoNet_P_TCP_frame_GET_dataOffset(in_fr)))*4);
out_fr->seqNo32b = t_seqAckNo;
return 0;
// ACK+PSH
in_pack->msgType = ETH_IP_TCP_ACKPSH;
}else{
printf("ACK\r\n");
return -1;
// ACK
in_pack->msgType = ETH_IP_TCP_ACK;
}
}else{
//
printf("--\r\n");
// --
//in_pack->msgType = ETH_IP_TCP_TXT;
return -(NEONET_PROT_TCP_ERR_MASTER+3);
}
}
return in_fr_len;
in_pack->payload = neoNet_P_TCP_frame_DATAPTR(in_fr);
in_pack->payloadLen = in_pack->len[in_lyr]-(((uint16_t)(neoNet_P_TCP_frame_GET_dataOffset(in_fr)))*4);
return in_pack->payloadLen+1;
}
int16_t neoNet_P_TCP_prepSend(neoNet_utils_DevInfo* in_dev, neoNet_IPpseudoHeader* in_pHdr, neoNet_P_TCP_Frame* out_fr, uint16_t out_fr_dataLen){
int16_t neoNet_P_TCP_prepResp(neoNet_utils_DevInfo* in_dev, neoNet_Packet* in_pack, uint8_t in_lyr, neoNet_Packet* out_pack, uint8_t out_lyr){
// in_pack and out_pack must not point to the same buffer
neoNet_P_TCP_Frame* in_fr = (neoNet_P_TCP_Frame*)(in_pack->data[in_lyr]);
neoNet_P_TCP_Frame* out_fr = (neoNet_P_TCP_Frame*)(out_pack->data[out_lyr]);
out_fr->srcPort16b = in_fr->dstPort16b;
out_fr->dstPort16b = in_fr->srcPort16b;
out_fr->ackNo32b = in_fr->seqNo32b + 1;
out_fr->seqNo32b = in_fr->ackNo32b;
neoNet_P_TCP_frame_SET_dataOffset(out_fr, 5); // NOTE: for now we assume we don't need the TCP hdr opts
// NOTE: you might want to set dataOffset
out_fr->flags8b = in_fr->flags8b;
out_fr->rxWinSize16b = in_fr->rxWinSize16b;
out_fr->wholeFrameChksm16b = 0;
out_fr->urgentPointer16b = in_fr->urgentPointer16b;
out_pack->type[out_lyr] = TCP;
out_pack->len[out_lyr] = 0;
/*for(uint8_t i_lyr=0;i_lyr<=out_lyr;++i_lyr){
out_pack->len[i_lyr] += ((uint16_t)(neoNet_P_TCP_frame_GET_dataOffset(out_fr)))*4;
}*/
out_pack->type[out_lyr+1] = NOPROT;
out_pack->data[out_lyr+1] = neoNet_P_TCP_frame_DATAPTR(out_fr);
out_pack->len[out_lyr+1] = in_pack->len[in_lyr]-((uint16_t)(neoNet_P_TCP_frame_GET_dataOffset(out_fr)))*4;
return 0;
}
int16_t neoNet_P_TCP_prepSend(neoNet_utils_DevInfo* in_dev, neoNet_Packet* out_pack, uint8_t out_lyr){
static neoNet_IPpseudoHeader t_pHdr;
neoNet_P_TCP_Frame* out_fr = (neoNet_P_TCP_Frame*)(out_pack->data[out_lyr]);
out_fr->srcPort16b = htons(out_fr->srcPort16b);
out_fr->dstPort16b = htons(out_fr->dstPort16b);
out_fr->seqNo32b = htonl(out_fr->seqNo32b);
@ -83,7 +104,10 @@ int16_t neoNet_P_TCP_prepSend(neoNet_utils_DevInfo* in_dev, neoNet_IPpseudoHeade
out_fr->urgentPointer16b = htons(out_fr->urgentPointer16b);
out_fr->wholeFrameChksm16b = 0;
out_fr->wholeFrameChksm16b = neoNet_IPpseudoHeader_calcChecksum(in_pHdr, (uint8_t*)out_fr, out_fr_dataLen + (((uint16_t)(neoNet_P_TCP_frame_GET_dataOffset(out_fr)))*4));
neoNet_IPpseudoHeader_fromIPFrame((neoNet_P_IP_Frame*)(out_pack->data[out_lyr-1]), out_pack->len[out_lyr], &t_pHdr);
out_fr->wholeFrameChksm16b = neoNet_IPpseudoHeader_calcChecksum(&t_pHdr, (uint8_t*)out_fr, out_pack->len[out_lyr+1] + (((uint16_t)(neoNet_P_TCP_frame_GET_dataOffset(out_fr)))*4));
return out_fr_dataLen + (((uint16_t)(neoNet_P_TCP_frame_GET_dataOffset(out_fr)))*4);
out_pack->len[out_lyr] = out_pack->len[out_lyr+1] + ((uint16_t)(neoNet_P_TCP_frame_GET_dataOffset(out_fr)))*4;
return 0;
}

View File

@ -1,34 +1,66 @@
#include "lib_neoNet_prot_UDP.h"
int32_t neoNet_P_UDP_prepRead(neoNet_utils_DevInfo* in_dev, neoNet_IPpseudoHeader* in_pHdr, neoNet_P_UDP_Frame* in_fr, uint16_t in_fr_len){
if(in_fr_len < 8){ return -(NEONET_PROT_UDP_ERR_MASTER+1); }
int32_t neoNet_P_UDP_prepRead(neoNet_utils_DevInfo* in_dev, neoNet_Packet* in_pack, uint8_t in_lyr){
neoNet_P_UDP_Frame* in_fr = (neoNet_P_UDP_Frame*)(in_pack->data[in_lyr]);
static neoNet_IPpseudoHeader t_pHdr;
if(neoNet_IPpseudoHeader_calcChecksum(in_pHdr, (uint8_t*)in_fr, in_fr_len) != 0){ return -(NEONET_PROT_UDP_ERR_MASTER+2); }
if(in_pack->len[in_lyr] < 8){ return -(NEONET_PROT_UDP_ERR_MASTER+1); }
neoNet_IPpseudoHeader_fromIPFrame((neoNet_P_IP_Frame*)(in_pack->data[in_lyr-1]), in_pack->len[in_lyr], &t_pHdr);
if(neoNet_IPpseudoHeader_calcChecksum(&t_pHdr, (uint8_t*)in_fr, in_pack->len[in_lyr]) != 0){ return -(NEONET_PROT_UDP_ERR_MASTER+2); }
in_fr->srcPort16b = ntohs(in_fr->srcPort16b);
in_fr->dstPort16b = ntohs(in_fr->dstPort16b);
in_fr->wholeFrameLen16b = ntohs(in_fr->wholeFrameLen16b);
return in_fr_len - 8;
/////////////////////////////////
in_pack->msgType = ETH_IP_UDP_TXT;
in_pack->payload = in_fr->data;
in_pack->payloadLen = in_pack->len[in_lyr]-8;
return in_pack->payloadLen+1;
}
int32_t neoNet_P_UDP_prepResp(neoNet_utils_DevInfo* in_dev, neoNet_P_UDP_Frame* in_fr, neoNet_P_UDP_Frame* out_fr){
static uint16_t t_port;
t_port = in_fr->srcPort16b;
int32_t neoNet_P_UDP_prepResp(neoNet_utils_DevInfo* in_dev, neoNet_Packet* in_pack, uint8_t in_lyr, neoNet_Packet* out_pack, uint8_t out_lyr){
// in_pack and out_pack must not point to the same buffer
neoNet_P_UDP_Frame* in_fr = (neoNet_P_UDP_Frame*)(in_pack->data[in_lyr]);
neoNet_P_UDP_Frame* out_fr = (neoNet_P_UDP_Frame*)(out_pack->data[out_lyr]);
out_fr->srcPort16b = in_fr->dstPort16b;
out_fr->dstPort16b = t_port;
out_fr->dstPort16b = in_fr->srcPort16b;
out_fr->wholeFrameChksm16b = 0;
out_pack->type[out_lyr] = UDP;
out_pack->len[out_lyr] = 0;
/*for(uint8_t i_lyr=0;i_lyr<=out_lyr;++i_lyr){
out_pack->len[i_lyr] += 8;
}*/
out_pack->type[out_lyr+1] = NOPROT;
out_pack->data[out_lyr+1] = out_fr->data;
out_pack->len[out_lyr+1] = in_pack->len[in_lyr]-8;
return 0;
}
int32_t neoNet_P_UDP_prepSend(neoNet_utils_DevInfo* in_dev, neoNet_IPpseudoHeader* in_pHdr, neoNet_P_UDP_Frame* out_fr, uint16_t out_fr_dataLen){
int32_t neoNet_P_UDP_prepSend(neoNet_utils_DevInfo* in_dev, neoNet_Packet* out_pack, uint8_t out_lyr){
static neoNet_IPpseudoHeader t_pHdr;
neoNet_P_UDP_Frame* out_fr = (neoNet_P_UDP_Frame*)(out_pack->data[out_lyr]);
out_fr->wholeFrameLen16b = out_pack->len[out_lyr+1] + 8;
out_fr->srcPort16b = htons(out_fr->srcPort16b);
out_fr->dstPort16b = htons(out_fr->dstPort16b);
out_fr->wholeFrameLen16b = htons(out_fr->wholeFrameLen16b);
out_fr->wholeFrameChksm16b = 0;
out_fr->wholeFrameChksm16b = neoNet_IPpseudoHeader_calcChecksum(in_pHdr, (uint8_t*)out_fr, out_fr_dataLen);
neoNet_IPpseudoHeader_fromIPFrame((neoNet_P_IP_Frame*)(out_pack->data[out_lyr-1]), out_pack->len[out_lyr], &t_pHdr);
out_fr->wholeFrameChksm16b = neoNet_IPpseudoHeader_calcChecksum(&t_pHdr, (uint8_t*)out_fr, out_pack->len[out_lyr+1]);
return out_fr_dataLen + 8;
out_pack->len[out_lyr] = out_pack->len[out_lyr+1] + 8;
return 0;
}

View File

@ -1,28 +1,64 @@
#include "lib_neoNet_prot_eth.h"
int32_t neoNet_P_eth_prepRead(neoNet_utils_DevInfo* in_dev, neoNet_P_eth_Frame* in_fr, uint16_t in_fr_len){
int32_t neoNet_P_eth_prepRead(neoNet_utils_DevInfo* in_dev, neoNet_Packet* in_pack, uint8_t in_lyr){
neoNet_P_eth_Frame* in_fr = (neoNet_P_eth_Frame*)(in_pack->data[in_lyr]);
// we assume the MAC check has been done by the hw
if(in_fr_len < 14){ return -(NEONET_PROT_ETH_ERR_MASTER+1); }
if(in_pack->len[in_lyr] < 14){ return -(NEONET_PROT_ETH_ERR_MASTER+1); }
in_fr->etherType16b = ntohs(in_fr->etherType16b);
return in_fr_len - 14;
}
/////////////////////////////////
int16_t neoNet_P_eth_prepResp(neoNet_utils_DevInfo* in_dev, neoNet_P_eth_Frame* in_fr, neoNet_P_eth_Frame* out_fr){
// NOTE: this func must work also if in_fr==out_fr
switch(in_fr->etherType16b){
case NEONET_P_ETH_CONST_ETHERTYPE_ARP:
in_pack->type[in_lyr+1] = ARP;
break;
memcpy(out_fr->dstMac48b, in_fr->srcMac48b, 6);
memcpy(out_fr->srcMac48b, in_dev->macAddr, 6);
if(&out_fr->etherType16b == &in_fr->etherType16b){ memcpy(&out_fr->etherType16b, &in_fr->etherType16b, 2); }
case NEONET_P_ETH_CONST_ETHERTYPE_IP4:
in_pack->type[in_lyr+1] = IP4;
break;
default:
return -(NEONET_PROT_ETH_ERR_MASTER+2);
}
// TODO: you should check here if lyr+1 won't overflow the arrs
in_pack->data[in_lyr+1] = in_fr->data;
in_pack->len[in_lyr+1] = in_pack->len[in_lyr] - 14;
return 0;
}
int16_t neoNet_P_eth_prepSend(neoNet_utils_DevInfo* in_dev, neoNet_P_eth_Frame* out_fr, uint16_t out_fr_dataLen){
int16_t neoNet_P_eth_prepResp(neoNet_utils_DevInfo* in_dev, neoNet_Packet* in_pack, uint8_t in_lyr, neoNet_Packet* out_pack, uint8_t out_lyr){
// in_pack and out_pack must not point to the same buffer
neoNet_P_eth_Frame* in_fr = (neoNet_P_eth_Frame*)(in_pack->data[in_lyr]);
neoNet_P_eth_Frame* out_fr = (neoNet_P_eth_Frame*)(out_pack->data[out_lyr]);
memcpy(out_fr->dstMac48b, in_fr->srcMac48b, 6);
memcpy(out_fr->srcMac48b, in_dev->macAddr, 6);
memcpy(&out_fr->etherType16b, &in_fr->etherType16b, 2);
out_pack->type[out_lyr] = ETH;
out_pack->len[out_lyr] = 0;
/*for(uint8_t i_lyr=0;i_lyr<=out_lyr;++i_lyr){
out_pack->len[i_lyr] += 14;
}*/
out_pack->data[out_lyr+1] = out_fr->data;
return 0;
}
int16_t neoNet_P_eth_prepSend(neoNet_utils_DevInfo* in_dev, neoNet_Packet* out_pack, uint8_t out_lyr){
neoNet_P_eth_Frame* out_fr = (neoNet_P_eth_Frame*)(out_pack->data[out_lyr]);
out_fr->etherType16b = htons(out_fr->etherType16b);
return out_fr_dataLen + 14;
out_pack->len[out_lyr] = out_pack->len[out_lyr+1] + 14;
return 0;
}

View File

@ -48,3 +48,14 @@
1 121 1790063782962072262 CMakeFiles/test4_f4_eth.dir/Libs/neoNet/src/lib_neoNet_prot_ARP.c.obj a4e03ac6da07a1fd
1 86 1790087100027103080 CMakeFiles/test4_f4_eth.dir/Core/Src/main.c.obj a6ce0c44ed1d7043
87 145 1790087100084104166 test4_f4_eth.elf 3ba6b7f5ac25dbf8
3 78 1790111035352758987 CMakeFiles/test4_f4_eth.dir/Libs/neoNet/src/lib_neoNet_IPpseudoHeader.c.obj afc4b3913f4d676a
2 87 1790111035360759124 CMakeFiles/test4_f4_eth.dir/Libs/neoNet/src/lib_neoNet_prot_ICMP.c.obj 55b08397096c197d
2 70 1790111202305678405 CMakeFiles/test4_f4_eth.dir/Libs/neoNet/src/lib_neoNet_prot_UDP.c.obj 5b1566c09bd2dc49
2 95 1790111226036094134 CMakeFiles/test4_f4_eth.dir/Libs/neoNet/src/lib_neoNet_prot_ARP.c.obj a4e03ac6da07a1fd
2 74 1790111296721329917 CMakeFiles/test4_f4_eth.dir/Libs/neoNet/src/lib_neoNet_prot_TCP.c.obj f7d3bd8870c2b260
2 69 1790111358593408809 CMakeFiles/test4_f4_eth.dir/Libs/neoNet/src/lib_neoNet_prot_eth.c.obj 85ca70de54177e88
2 76 1790111447733959215 CMakeFiles/test4_f4_eth.dir/Libs/neoNet/src/lib_neoNet_prot_IP.c.obj 277467c2b7d9a76f
1 80 1790111913658010354 CMakeFiles/test4_f4_eth.dir/Libs/neoNet/src/lib_neoNet.c.obj 24c6020bbb244d35
2 75 1790112156944193154 CMakeFiles/test4_f4_eth.dir/Libs/neoNet/src/lib_neoNet.c.obj 24c6020bbb244d35
2 79 1790112301181669199 CMakeFiles/test4_f4_eth.dir/Core/Src/main.c.obj a6ce0c44ed1d7043
79 141 1790112301241670229 test4_f4_eth.elf 3ba6b7f5ac25dbf8

View File

@ -1,6 +1,6 @@
/home/mbowszys/polip/PWr_AiR_eng/test/test4_f4_eth/test4_f4_eth/Core/Src/main.c:76:5:_write 24 static
/home/mbowszys/polip/PWr_AiR_eng/test/test4_f4_eth/test4_f4_eth/Core/Src/main.c:84:6:HAL_I2S_TxHalfCpltCallback 24 static
/home/mbowszys/polip/PWr_AiR_eng/test/test4_f4_eth/test4_f4_eth/Core/Src/main.c:92:6:HAL_I2S_TxCpltCallback 24 static
/home/mbowszys/polip/PWr_AiR_eng/test/test4_f4_eth/test4_f4_eth/Core/Src/main.c:106:5:main 24 static
/home/mbowszys/polip/PWr_AiR_eng/test/test4_f4_eth/test4_f4_eth/Core/Src/main.c:273:6:SystemClock_Config 88 static
/home/mbowszys/polip/PWr_AiR_eng/test/test4_f4_eth/test4_f4_eth/Core/Src/main.c:323:6:Error_Handler 4 static,ignoring_inline_asm
/home/mbowszys/polip/PWr_AiR_eng/test/test4_f4_eth/test4_f4_eth/Core/Src/main.c:106:5:main 32 static
/home/mbowszys/polip/PWr_AiR_eng/test/test4_f4_eth/test4_f4_eth/Core/Src/main.c:269:6:SystemClock_Config 88 static
/home/mbowszys/polip/PWr_AiR_eng/test/test4_f4_eth/test4_f4_eth/Core/Src/main.c:319:6:Error_Handler 4 static,ignoring_inline_asm

View File

@ -1,9 +1,3 @@
/home/mbowszys/polip/PWr_AiR_eng/test/test4_f4_eth/test4_f4_eth/Libs/neoNet/src/lib_neoNet.c:14:9:neoNet_prepRead0 24 static
/home/mbowszys/polip/PWr_AiR_eng/test/test4_f4_eth/test4_f4_eth/Libs/neoNet/src/lib_neoNet.c:48:9:neoNet_prepRead1 24 static
/home/mbowszys/polip/PWr_AiR_eng/test/test4_f4_eth/test4_f4_eth/Libs/neoNet/src/lib_neoNet.c:110:9:neoNet_prepRead2 24 static
/home/mbowszys/polip/PWr_AiR_eng/test/test4_f4_eth/test4_f4_eth/Libs/neoNet/src/lib_neoNet.c:181:9:neoNet_prepResp0 24 static
/home/mbowszys/polip/PWr_AiR_eng/test/test4_f4_eth/test4_f4_eth/Libs/neoNet/src/lib_neoNet.c:202:9:neoNet_prepResp1 24 static
/home/mbowszys/polip/PWr_AiR_eng/test/test4_f4_eth/test4_f4_eth/Libs/neoNet/src/lib_neoNet.c:231:9:neoNet_prepResp2 24 static
/home/mbowszys/polip/PWr_AiR_eng/test/test4_f4_eth/test4_f4_eth/Libs/neoNet/src/lib_neoNet.c:278:9:neoNet_prepSend2 24 static
/home/mbowszys/polip/PWr_AiR_eng/test/test4_f4_eth/test4_f4_eth/Libs/neoNet/src/lib_neoNet.c:330:9:neoNet_prepSend1 24 static
/home/mbowszys/polip/PWr_AiR_eng/test/test4_f4_eth/test4_f4_eth/Libs/neoNet/src/lib_neoNet.c:361:9:neoNet_prepSend0 24 static
/home/mbowszys/polip/PWr_AiR_eng/test/test4_f4_eth/test4_f4_eth/Libs/neoNet/src/lib_neoNet.c:14:9:neoNet_prepRead 24 static
/home/mbowszys/polip/PWr_AiR_eng/test/test4_f4_eth/test4_f4_eth/Libs/neoNet/src/lib_neoNet.c:46:9:neoNet_prepResp 56 static
/home/mbowszys/polip/PWr_AiR_eng/test/test4_f4_eth/test4_f4_eth/Libs/neoNet/src/lib_neoNet.c:171:9:neoNet_prepSend 24 static

View File

@ -1,3 +1,3 @@
/home/mbowszys/polip/PWr_AiR_eng/test/test4_f4_eth/test4_f4_eth/Libs/neoNet/src/lib_neoNet_prot_ARP.c:6:9:neoNet_P_ARP_prepRead 32 static
/home/mbowszys/polip/PWr_AiR_eng/test/test4_f4_eth/test4_f4_eth/Libs/neoNet/src/lib_neoNet_prot_ARP.c:25:9:neoNet_P_ARP_prepResp 24 static
/home/mbowszys/polip/PWr_AiR_eng/test/test4_f4_eth/test4_f4_eth/Libs/neoNet/src/lib_neoNet_prot_ARP.c:39:9:neoNet_P_ARP_prepSend 24 static
/home/mbowszys/polip/PWr_AiR_eng/test/test4_f4_eth/test4_f4_eth/Libs/neoNet/src/lib_neoNet_prot_ARP.c:6:9:neoNet_P_ARP_prepRead 40 static
/home/mbowszys/polip/PWr_AiR_eng/test/test4_f4_eth/test4_f4_eth/Libs/neoNet/src/lib_neoNet_prot_ARP.c:45:9:neoNet_P_ARP_prepResp 32 static
/home/mbowszys/polip/PWr_AiR_eng/test/test4_f4_eth/test4_f4_eth/Libs/neoNet/src/lib_neoNet_prot_ARP.c:72:9:neoNet_P_ARP_prepSend 32 static

View File

@ -1,3 +1,3 @@
/home/mbowszys/polip/PWr_AiR_eng/test/test4_f4_eth/test4_f4_eth/Libs/neoNet/src/lib_neoNet_prot_ICMP.c:4:9:neoNet_P_ICMP_prepRead 24 static
/home/mbowszys/polip/PWr_AiR_eng/test/test4_f4_eth/test4_f4_eth/Libs/neoNet/src/lib_neoNet_prot_ICMP.c:21:9:neoNet_P_ICMP_prepResp 24 static
/home/mbowszys/polip/PWr_AiR_eng/test/test4_f4_eth/test4_f4_eth/Libs/neoNet/src/lib_neoNet_prot_ICMP.c:37:9:neoNet_P_ICMP_prepSend 24 static
/home/mbowszys/polip/PWr_AiR_eng/test/test4_f4_eth/test4_f4_eth/Libs/neoNet/src/lib_neoNet_prot_ICMP.c:4:9:neoNet_P_ICMP_prepRead 32 static
/home/mbowszys/polip/PWr_AiR_eng/test/test4_f4_eth/test4_f4_eth/Libs/neoNet/src/lib_neoNet_prot_ICMP.c:36:9:neoNet_P_ICMP_prepResp 32 static
/home/mbowszys/polip/PWr_AiR_eng/test/test4_f4_eth/test4_f4_eth/Libs/neoNet/src/lib_neoNet_prot_ICMP.c:61:9:neoNet_P_ICMP_prepSend 32 static

View File

@ -1,3 +1,3 @@
/home/mbowszys/polip/PWr_AiR_eng/test/test4_f4_eth/test4_f4_eth/Libs/neoNet/src/lib_neoNet_prot_IP.c:7:9:neoNet_P_IP_prepRead 24 static
/home/mbowszys/polip/PWr_AiR_eng/test/test4_f4_eth/test4_f4_eth/Libs/neoNet/src/lib_neoNet_prot_IP.c:30:9:neoNet_P_IP_prepResp 24 static
/home/mbowszys/polip/PWr_AiR_eng/test/test4_f4_eth/test4_f4_eth/Libs/neoNet/src/lib_neoNet_prot_IP.c:42:9:neoNet_P_IP_prepSend 24 static
/home/mbowszys/polip/PWr_AiR_eng/test/test4_f4_eth/test4_f4_eth/Libs/neoNet/src/lib_neoNet_prot_IP.c:6:9:neoNet_P_IP_prepRead 40 static
/home/mbowszys/polip/PWr_AiR_eng/test/test4_f4_eth/test4_f4_eth/Libs/neoNet/src/lib_neoNet_prot_IP.c:54:9:neoNet_P_IP_prepResp 32 static
/home/mbowszys/polip/PWr_AiR_eng/test/test4_f4_eth/test4_f4_eth/Libs/neoNet/src/lib_neoNet_prot_IP.c:78:9:neoNet_P_IP_prepSend 32 static

View File

@ -1,3 +1,3 @@
/home/mbowszys/polip/PWr_AiR_eng/test/test4_f4_eth/test4_f4_eth/Libs/neoNet/src/lib_neoNet_prot_TCP.c:5:9:neoNet_P_TCP_prepRead 24 static
/home/mbowszys/polip/PWr_AiR_eng/test/test4_f4_eth/test4_f4_eth/Libs/neoNet/src/lib_neoNet_prot_TCP.c:23:9:neoNet_P_TCP_prepResp 32 static
/home/mbowszys/polip/PWr_AiR_eng/test/test4_f4_eth/test4_f4_eth/Libs/neoNet/src/lib_neoNet_prot_TCP.c:76:9:neoNet_P_TCP_prepSend 24 static
/home/mbowszys/polip/PWr_AiR_eng/test/test4_f4_eth/test4_f4_eth/Libs/neoNet/src/lib_neoNet_prot_TCP.c:5:9:neoNet_P_TCP_prepRead 32 static
/home/mbowszys/polip/PWr_AiR_eng/test/test4_f4_eth/test4_f4_eth/Libs/neoNet/src/lib_neoNet_prot_TCP.c:61:9:neoNet_P_TCP_prepResp 32 static
/home/mbowszys/polip/PWr_AiR_eng/test/test4_f4_eth/test4_f4_eth/Libs/neoNet/src/lib_neoNet_prot_TCP.c:94:9:neoNet_P_TCP_prepSend 32 static

View File

@ -1,3 +1,3 @@
/home/mbowszys/polip/PWr_AiR_eng/test/test4_f4_eth/test4_f4_eth/Libs/neoNet/src/lib_neoNet_prot_UDP.c:4:9:neoNet_P_UDP_prepRead 24 static
/home/mbowszys/polip/PWr_AiR_eng/test/test4_f4_eth/test4_f4_eth/Libs/neoNet/src/lib_neoNet_prot_UDP.c:16:9:neoNet_P_UDP_prepResp 24 static
/home/mbowszys/polip/PWr_AiR_eng/test/test4_f4_eth/test4_f4_eth/Libs/neoNet/src/lib_neoNet_prot_UDP.c:25:9:neoNet_P_UDP_prepSend 24 static
/home/mbowszys/polip/PWr_AiR_eng/test/test4_f4_eth/test4_f4_eth/Libs/neoNet/src/lib_neoNet_prot_UDP.c:4:9:neoNet_P_UDP_prepRead 32 static
/home/mbowszys/polip/PWr_AiR_eng/test/test4_f4_eth/test4_f4_eth/Libs/neoNet/src/lib_neoNet_prot_UDP.c:27:9:neoNet_P_UDP_prepResp 32 static
/home/mbowszys/polip/PWr_AiR_eng/test/test4_f4_eth/test4_f4_eth/Libs/neoNet/src/lib_neoNet_prot_UDP.c:49:9:neoNet_P_UDP_prepSend 32 static

View File

@ -1,3 +1,3 @@
/home/mbowszys/polip/PWr_AiR_eng/test/test4_f4_eth/test4_f4_eth/Libs/neoNet/src/lib_neoNet_prot_eth.c:4:9:neoNet_P_eth_prepRead 24 static
/home/mbowszys/polip/PWr_AiR_eng/test/test4_f4_eth/test4_f4_eth/Libs/neoNet/src/lib_neoNet_prot_eth.c:14:9:neoNet_P_eth_prepResp 24 static
/home/mbowszys/polip/PWr_AiR_eng/test/test4_f4_eth/test4_f4_eth/Libs/neoNet/src/lib_neoNet_prot_eth.c:24:9:neoNet_P_eth_prepSend 24 static
/home/mbowszys/polip/PWr_AiR_eng/test/test4_f4_eth/test4_f4_eth/Libs/neoNet/src/lib_neoNet_prot_eth.c:4:9:neoNet_P_eth_prepRead 32 static
/home/mbowszys/polip/PWr_AiR_eng/test/test4_f4_eth/test4_f4_eth/Libs/neoNet/src/lib_neoNet_prot_eth.c:36:9:neoNet_P_eth_prepResp 32 static
/home/mbowszys/polip/PWr_AiR_eng/test/test4_f4_eth/test4_f4_eth/Libs/neoNet/src/lib_neoNet_prot_eth.c:56:9:neoNet_P_eth_prepSend 32 static

File diff suppressed because it is too large Load Diff