mirror of
https://github.com/azure-rtos/netx.git
synced 2023-08-10 07:57:54 +08:00
Update on 31 Mar 2023. Expand to see details.
d91a02534 Add adu agent install unit test. b6819d250 Support random IP id 19c78054f Corrected the include order for IoT Security module.
This commit is contained in:
parent
2ade6b2054
commit
c52d090e19
@ -2820,7 +2820,7 @@ struct sockaddr_in peer4_address;
|
||||
/* FUNCTION RELEASE */
|
||||
/* */
|
||||
/* nx_bsd_send_internal PORTABLE C */
|
||||
/* 6.1 */
|
||||
/* 6.x */
|
||||
/* AUTHOR */
|
||||
/* */
|
||||
/* Yuxin Zhou, Microsoft Corporation */
|
||||
@ -2851,7 +2851,7 @@ struct sockaddr_in peer4_address;
|
||||
/* set_errno Sets the BSD errno */
|
||||
/* nx_packet_allocate Allocate a packet */
|
||||
/* nx_packet_data_append Append data to the packet */
|
||||
/* tx_mutex_get Get Mutex protction */
|
||||
/* tx_mutex_get Get Mutex protection */
|
||||
/* tx_mutex_put Release Mutex protection */
|
||||
/* nx_packet_release Release the packet on error */
|
||||
/* nx_udp_socket_send UDP packet send */
|
||||
@ -2870,6 +2870,9 @@ struct sockaddr_in peer4_address;
|
||||
/* 05-19-2020 Yuxin Zhou Initial Version 6.0 */
|
||||
/* 09-30-2020 Yuxin Zhou Modified comment(s), */
|
||||
/* resulting in version 6.1 */
|
||||
/* xx-xx-xxxx Tiejun Zhou Modified comment(s), */
|
||||
/* supported random IP id, */
|
||||
/* resulting in version 6.x */
|
||||
/* */
|
||||
/**************************************************************************/
|
||||
static INT nx_bsd_send_internal(INT sockID, const CHAR *msg, INT msgLength, INT flags,
|
||||
|
@ -6992,7 +6992,7 @@ UINT name_length;
|
||||
/* FUNCTION RELEASE */
|
||||
/* */
|
||||
/* _nx_dhcp_client_send_with_zero_source_address PORTABLE C */
|
||||
/* 6.1.12 */
|
||||
/* 6.x */
|
||||
/* AUTHOR */
|
||||
/* */
|
||||
/* Yuxin Zhou, Microsoft Corporation */
|
||||
@ -7033,6 +7033,9 @@ UINT name_length;
|
||||
/* udp socket send and ip */
|
||||
/* header add, */
|
||||
/* resulting in version 6.1.12 */
|
||||
/* xx-xx-xxxx Tiejun Zhou Modified comment(s), */
|
||||
/* supported random IP id, */
|
||||
/* resulting in version 6.x */
|
||||
/* */
|
||||
/**************************************************************************/
|
||||
static UINT _nx_dhcp_client_send_with_zero_source_address(NX_DHCP *dhcp_ptr, UINT iface_index, NX_PACKET *packet_ptr)
|
||||
@ -7159,7 +7162,11 @@ NX_IP_DRIVER driver_request;
|
||||
ip_header_ptr -> nx_ip_header_word_0 = (NX_IP_VERSION | socket_ptr -> nx_udp_socket_type_of_service | (0xFFFF & packet_ptr -> nx_packet_length));
|
||||
|
||||
/* Build the second 32-bit word of the IP header. */
|
||||
#ifdef NX_ENABLE_IP_ID_RANDOMIZATION
|
||||
ip_header_ptr -> nx_ip_header_word_1 = (((ULONG)NX_RAND()) << NX_SHIFT_BY_16) | socket_ptr -> nx_udp_socket_fragment_enable;
|
||||
#else
|
||||
ip_header_ptr -> nx_ip_header_word_1 = (ip_ptr -> nx_ip_packet_id++ << NX_SHIFT_BY_16) | socket_ptr -> nx_udp_socket_fragment_enable;
|
||||
#endif /* NX_ENABLE_IP_ID_RANDOMIZATION */
|
||||
|
||||
/* Build the third 32-bit word of the IP header. */
|
||||
ip_header_ptr -> nx_ip_header_word_2 = ((socket_ptr -> nx_udp_socket_time_to_live << NX_IP_TIME_TO_LIVE_SHIFT) | NX_IP_UDP);
|
||||
|
@ -26,7 +26,7 @@
|
||||
/* APPLICATION INTERFACE DEFINITION RELEASE */
|
||||
/* */
|
||||
/* nx_api.h PORTABLE C */
|
||||
/* 6.2.1 */
|
||||
/* 6.x */
|
||||
/* AUTHOR */
|
||||
/* */
|
||||
/* Yuxin Zhou, Microsoft Corporation */
|
||||
@ -94,6 +94,9 @@
|
||||
/* 03-08-2023 Tiejun Zhou Modified comment(s), and */
|
||||
/* updated product constants, */
|
||||
/* resulting in version 6.2.1 */
|
||||
/* xx-xx-xxxx Tiejun Zhou Modified comment(s), */
|
||||
/* supported random IP id, */
|
||||
/* resulting in version 6.x */
|
||||
/* */
|
||||
/**************************************************************************/
|
||||
|
||||
@ -1517,8 +1520,10 @@ typedef struct NX_IP_STRUCT
|
||||
pointed to by this member should be called. */
|
||||
VOID (*nx_ip_forward_packet_process)(struct NX_IP_STRUCT *, NX_PACKET *);
|
||||
|
||||
#ifndef NX_ENABLE_IP_ID_RANDOMIZATION
|
||||
/* Define the packet ID. */
|
||||
ULONG nx_ip_packet_id;
|
||||
#endif /* NX_ENABLE_IP_ID_RANDOMIZATION */
|
||||
|
||||
/* Define the default packet pool. */
|
||||
struct NX_PACKET_POOL_STRUCT
|
||||
|
@ -26,7 +26,7 @@
|
||||
/* PORT SPECIFIC C INFORMATION RELEASE */
|
||||
/* */
|
||||
/* nx_user.h PORTABLE C */
|
||||
/* 6.1.12 */
|
||||
/* 6.x */
|
||||
/* */
|
||||
/* AUTHOR */
|
||||
/* */
|
||||
@ -52,6 +52,9 @@
|
||||
/* 07-29-2022 Yuxin Zhou Modified comment(s), and */
|
||||
/* added NX_ASSERT, */
|
||||
/* resulting in version 6.1.12 */
|
||||
/* xx-xx-xxxx Tiejun Zhou Modified comment(s), */
|
||||
/* supported random IP id, */
|
||||
/* resulting in version 6.x */
|
||||
/* */
|
||||
/**************************************************************************/
|
||||
|
||||
@ -80,6 +83,11 @@
|
||||
#define NX_ENABLE_IP_STATIC_ROUTING
|
||||
*/
|
||||
|
||||
/* Defined, this option enables random IP id. By default IP id is increased by one for each packet. */
|
||||
/*
|
||||
#define NX_ENABLE_IP_ID_RANDOMIZATION
|
||||
*/
|
||||
|
||||
/* This define specifies the size of the physical packet header. The default value is 16 (based on
|
||||
a typical 16-byte Ethernet header). */
|
||||
|
||||
|
@ -36,7 +36,7 @@
|
||||
/* FUNCTION RELEASE */
|
||||
/* */
|
||||
/* _nx_ip_create PORTABLE C */
|
||||
/* 6.1 */
|
||||
/* 6.x */
|
||||
/* AUTHOR */
|
||||
/* */
|
||||
/* Yuxin Zhou, Microsoft Corporation */
|
||||
@ -83,6 +83,9 @@
|
||||
/* 05-19-2020 Yuxin Zhou Initial Version 6.0 */
|
||||
/* 09-30-2020 Yuxin Zhou Modified comment(s), */
|
||||
/* resulting in version 6.1 */
|
||||
/* xx-xx-xxxx Tiejun Zhou Modified comment(s), */
|
||||
/* supported random IP id, */
|
||||
/* resulting in version 6.x */
|
||||
/* */
|
||||
/**************************************************************************/
|
||||
UINT _nx_ip_create(NX_IP *ip_ptr, CHAR *name, ULONG ip_address, ULONG network_mask,
|
||||
@ -165,7 +168,9 @@ NX_IP *tail_ptr;
|
||||
ip_ptr -> nx_ip_name = name;
|
||||
|
||||
/* Set the initial IP packet ID. */
|
||||
#ifndef NX_ENABLE_IP_ID_RANDOMIZATION
|
||||
ip_ptr -> nx_ip_packet_id = NX_INIT_PACKET_ID;
|
||||
#endif /* NX_ENABLE_IP_ID_RANDOMIZATION */
|
||||
|
||||
/* Setup the default packet pool for this IP instance. */
|
||||
ip_ptr -> nx_ip_default_packet_pool = default_pool;
|
||||
|
@ -37,7 +37,7 @@
|
||||
/* FUNCTION RELEASE */
|
||||
/* */
|
||||
/* _nx_ip_packet_send PORTABLE C */
|
||||
/* 6.1 */
|
||||
/* 6.x */
|
||||
/* AUTHOR */
|
||||
/* */
|
||||
/* Yuxin Zhou, Microsoft Corporation */
|
||||
@ -80,6 +80,9 @@
|
||||
/* 05-19-2020 Yuxin Zhou Initial Version 6.0 */
|
||||
/* 09-30-2020 Yuxin Zhou Modified comment(s), */
|
||||
/* resulting in version 6.1 */
|
||||
/* xx-xx-xxxx Tiejun Zhou Modified comment(s), */
|
||||
/* supported random IP id, */
|
||||
/* resulting in version 6.x */
|
||||
/* */
|
||||
/**************************************************************************/
|
||||
|
||||
@ -157,7 +160,11 @@ UINT queued_count;
|
||||
ip_header_ptr -> nx_ip_header_word_0 = (NX_IP_VERSION | type_of_service | (0xFFFF & packet_ptr -> nx_packet_length));
|
||||
|
||||
/* Build the second 32-bit word of the IP header. */
|
||||
#ifdef NX_ENABLE_IP_ID_RANDOMIZATION
|
||||
ip_header_ptr -> nx_ip_header_word_1 = (((ULONG)NX_RAND()) << NX_SHIFT_BY_16) | fragment;
|
||||
#else
|
||||
ip_header_ptr -> nx_ip_header_word_1 = (ip_ptr -> nx_ip_packet_id++ << NX_SHIFT_BY_16) | fragment;
|
||||
#endif /* NX_ENABLE_IP_ID_RANDOMIZATION */
|
||||
|
||||
/* Build the third 32-bit word of the IP header. */
|
||||
ip_header_ptr -> nx_ip_header_word_2 = ((time_to_live << NX_IP_TIME_TO_LIVE_SHIFT) | protocol);
|
||||
|
Loading…
x
Reference in New Issue
Block a user