Home
last modified time | relevance | path

Searched refs:ip_header_ptr (Results 1 – 21 of 21) sorted by relevance

/NetX-Duo-v6.3.0/common/src/
Dnx_ip_forward_packet_process.c86 NX_IPV4_HEADER *ip_header_ptr; in _nx_ip_forward_packet_process() local
109 ip_header_ptr = (NX_IPV4_HEADER *)packet_ptr -> nx_packet_prepend_ptr; in _nx_ip_forward_packet_process()
112 if ((ip_header_ptr -> nx_ip_header_destination_ip & NX_IP_CLASS_D_MASK) == NX_IP_CLASS_D_TYPE) in _nx_ip_forward_packet_process()
121 if (((ip_header_ptr -> nx_ip_header_source_ip & 0xFFFF0000) == 0xA9FE0000) || in _nx_ip_forward_packet_process()
122 ((ip_header_ptr -> nx_ip_header_destination_ip & 0xFFFF0000) == 0xA9FE0000)) in _nx_ip_forward_packet_process()
131 …if (_nx_ip_route_find(ip_ptr, ip_header_ptr -> nx_ip_header_destination_ip, &outgoing_interface, &… in _nx_ip_forward_packet_process()
143 destination_ip = ip_header_ptr -> nx_ip_header_destination_ip; in _nx_ip_forward_packet_process()
144 …time_to_live = ((ip_header_ptr -> nx_ip_header_word_2 & NX_IP_TIME_TO_LIVE_MASK) >> NX_IP_TIME_TO_… in _nx_ip_forward_packet_process()
145 fragment_bit = (ip_header_ptr -> nx_ip_header_word_1 & NX_DONT_FRAGMENT); in _nx_ip_forward_packet_process()
163 ip_header_ptr -> nx_ip_header_word_2 = (ip_header_ptr -> nx_ip_header_word_2 - 0x01000000); in _nx_ip_forward_packet_process()
[all …]
Dnx_ip_header_add.c95 NX_IPV4_HEADER *ip_header_ptr; in _nx_ip_header_add() local
126 ip_header_ptr = (NX_IPV4_HEADER *)packet_ptr -> nx_packet_prepend_ptr; in _nx_ip_header_add()
148 ip_header_ptr -> nx_ip_header_word_0 = (ULONG)((NX_IP_VERSION_V4 << 28) | in _nx_ip_header_add()
158ip_header_ptr -> nx_ip_header_word_0 = (NX_IP_VERSION | type_of_service | (0xFFFF & packet_ptr ->… in _nx_ip_header_add()
163 ip_header_ptr -> nx_ip_header_word_1 = (((ULONG)NX_RAND()) << NX_SHIFT_BY_16) | fragment; in _nx_ip_header_add()
165ip_header_ptr -> nx_ip_header_word_1 = (ip_ptr -> nx_ip_packet_id++ << NX_SHIFT_BY_16) | fragment; in _nx_ip_header_add()
169 ip_header_ptr -> nx_ip_header_word_2 = ((time_to_live << NX_IP_TIME_TO_LIVE_SHIFT) | protocol); in _nx_ip_header_add()
172 ip_header_ptr -> nx_ip_header_source_ip = source_ip; in _nx_ip_header_add()
175 ip_header_ptr -> nx_ip_header_destination_ip = destination_ip; in _nx_ip_header_add()
193 NX_CHANGE_ULONG_ENDIAN(ip_header_ptr -> nx_ip_header_word_0); in _nx_ip_header_add()
[all …]
Dnx_ipv4_packet_receive.c96 NX_IPV4_HEADER *ip_header_ptr; in _nx_ipv4_packet_receive() local
122 ip_header_ptr = (NX_IPV4_HEADER *)packet_ptr -> nx_packet_prepend_ptr; in _nx_ipv4_packet_receive()
128 …NX_TRACE_IN_LINE_INSERT(NX_TRACE_INTERNAL_IP_RECEIVE, ip_ptr, ip_header_ptr -> nx_ip_header_source… in _nx_ipv4_packet_receive()
132 val = ip_header_ptr -> nx_ip_header_word_0; in _nx_ipv4_packet_receive()
337 NX_CHANGE_ULONG_ENDIAN(ip_header_ptr -> nx_ip_header_word_0); in _nx_ipv4_packet_receive()
338 NX_CHANGE_ULONG_ENDIAN(ip_header_ptr -> nx_ip_header_word_1); in _nx_ipv4_packet_receive()
339 NX_CHANGE_ULONG_ENDIAN(ip_header_ptr -> nx_ip_header_word_2); in _nx_ipv4_packet_receive()
340 NX_CHANGE_ULONG_ENDIAN(ip_header_ptr -> nx_ip_header_source_ip); in _nx_ipv4_packet_receive()
341 NX_CHANGE_ULONG_ENDIAN(ip_header_ptr -> nx_ip_header_destination_ip); in _nx_ipv4_packet_receive()
348 …if (((ip_header_ptr -> nx_ip_header_source_ip & ~(if_ptr -> nx_interface_ip_network_mask)) == ~(if… in _nx_ipv4_packet_receive()
[all …]
Dnx_icmpv4_send_error_message.c99 NX_IPV4_HEADER *ip_header_ptr; in _nx_icmpv4_send_error_message() local
127 ip_header_ptr = (NX_IPV4_HEADER *)(offending_packet -> nx_packet_ip_header); in _nx_icmpv4_send_error_message()
128 src_ip = ip_header_ptr -> nx_ip_header_source_ip; in _nx_icmpv4_send_error_message()
137 if ((ip_header_ptr -> nx_ip_header_destination_ip == NX_IP_LIMITED_BROADCAST) || in _nx_icmpv4_send_error_message()
138 ((ip_header_ptr -> nx_ip_header_destination_ip & NX_IP_CLASS_D_MASK) == NX_IP_CLASS_D_TYPE)) in _nx_icmpv4_send_error_message()
144 if (((ip_header_ptr -> nx_ip_header_destination_ip & if_ptr -> nx_interface_ip_network_mask) == in _nx_icmpv4_send_error_message()
146 … ((ip_header_ptr -> nx_ip_header_destination_ip & ~(if_ptr -> nx_interface_ip_network_mask)) == in _nx_icmpv4_send_error_message()
153 if (ip_header_ptr -> nx_ip_header_word_1 & NX_IP_OFFSET_MASK) in _nx_icmpv4_send_error_message()
161 if ((ip_header_ptr -> nx_ip_header_source_ip == 0) || in _nx_icmpv4_send_error_message()
162 ((ip_header_ptr -> nx_ip_header_source_ip >= NX_IP_LOOPBACK_FIRST) && in _nx_icmpv4_send_error_message()
[all …]
Dnx_ipv6_packet_receive.c90 NX_IPV6_HEADER *ip_header_ptr; in _nx_ipv6_packet_receive() local
108 ip_header_ptr = (NX_IPV6_HEADER *)packet_ptr -> nx_packet_prepend_ptr; in _nx_ipv6_packet_receive()
111 NX_CHANGE_ULONG_ENDIAN(ip_header_ptr -> nx_ip_header_word_1); in _nx_ipv6_packet_receive()
113 pkt_length = (UINT)((ip_header_ptr -> nx_ip_header_word_1 >> 16) + sizeof(NX_IPV6_HEADER)); in _nx_ipv6_packet_receive()
226 NX_CHANGE_ULONG_ENDIAN(ip_header_ptr -> nx_ip_header_word_0); in _nx_ipv6_packet_receive()
227 NX_IPV6_ADDRESS_CHANGE_ENDIAN(ip_header_ptr -> nx_ip_header_destination_ip); in _nx_ipv6_packet_receive()
228 NX_IPV6_ADDRESS_CHANGE_ENDIAN(ip_header_ptr -> nx_ip_header_source_ip); in _nx_ipv6_packet_receive()
243 if (CHECK_IPV6_ADDRESSES_SAME(ip_header_ptr -> nx_ip_header_destination_ip, in _nx_ipv6_packet_receive()
253 … else if (CHECK_IPV6_SOLICITED_NODE_MCAST_ADDRESS(ip_header_ptr -> nx_ip_header_destination_ip, in _nx_ipv6_packet_receive()
270 …if ((incoming_address == NX_NULL) && ((ip_header_ptr -> nx_ip_header_destination_ip[0] & 0xFF00000… in _nx_ipv6_packet_receive()
[all …]
Dnx_ipv6_header_add.c97 NX_IPV6_HEADER *ip_header_ptr; in _nx_ipv6_header_add() local
235 ip_header_ptr = (NX_IPV6_HEADER *)packet_ptr -> nx_packet_prepend_ptr; in _nx_ipv6_header_add()
239 ip_header_ptr -> nx_ip_header_word_0 = (ULONG)(6 << 28); in _nx_ipv6_header_add()
240 NX_CHANGE_ULONG_ENDIAN(ip_header_ptr -> nx_ip_header_word_0); in _nx_ipv6_header_add()
244 ip_header_ptr -> nx_ip_header_word_1 = (payload_size << 16) | (protocol << 8) | (hop_limit); in _nx_ipv6_header_add()
245 NX_CHANGE_ULONG_ENDIAN(ip_header_ptr -> nx_ip_header_word_1); in _nx_ipv6_header_add()
249 COPY_IPV6_ADDRESS(src_address, ip_header_ptr -> nx_ip_header_source_ip); in _nx_ipv6_header_add()
251 COPY_IPV6_ADDRESS(dest_address, ip_header_ptr -> nx_ip_header_destination_ip); in _nx_ipv6_header_add()
254 NX_IPV6_ADDRESS_CHANGE_ENDIAN(ip_header_ptr -> nx_ip_header_destination_ip); in _nx_ipv6_header_add()
255 NX_IPV6_ADDRESS_CHANGE_ENDIAN(ip_header_ptr -> nx_ip_header_source_ip); in _nx_ipv6_header_add()
[all …]
Dnx_icmp_packet_receive.c87 NX_IPV4_HEADER *ip_header_ptr; in _nx_icmp_packet_receive() local
128ip_header_ptr = (NX_IPV4_HEADER *)(packet_ptr -> nx_packet_prepend_ptr - sizeof(NX_IPV4_HEADER)); in _nx_icmp_packet_receive()
133 … ((ip_header_ptr -> nx_ip_header_destination_ip & NX_IP_CLASS_D_MASK) == NX_IP_CLASS_D_TYPE) || in _nx_icmp_packet_receive()
135 …(((ip_header_ptr -> nx_ip_header_destination_ip & interface_ptr -> nx_interface_ip_network_mask) =… in _nx_icmp_packet_receive()
136 …((ip_header_ptr -> nx_ip_header_destination_ip & ~(interface_ptr -> nx_interface_ip_network_mask))… in _nx_icmp_packet_receive()
138 … (ip_header_ptr -> nx_ip_header_destination_ip == interface_ptr -> nx_interface_ip_network) || in _nx_icmp_packet_receive()
140 (ip_header_ptr -> nx_ip_header_destination_ip == NX_IP_LIMITED_BROADCAST) in _nx_icmp_packet_receive()
Dnx_ip_packet_send.c102 NX_IPV4_HEADER *ip_header_ptr; in _nx_ip_packet_send() local
263 ip_header_ptr = (NX_IPV4_HEADER *)packet_ptr -> nx_packet_prepend_ptr; in _nx_ip_packet_send()
270 ip_header_ptr -> nx_ip_header_word_0 &= 0xFFFF; in _nx_ip_packet_send()
273 ip_header_ptr -> nx_ip_header_word_0 |= (ULONG)(value << NX_SHIFT_BY_16) & 0xFFFF0000; in _nx_ip_packet_send()
281 ip_header_ptr -> nx_ip_header_word_2 = ip_header_ptr -> nx_ip_header_word_2 & 0xFFFF; in _nx_ip_packet_send()
296 ip_header_ptr -> nx_ip_header_word_2 = ip_header_ptr -> nx_ip_header_word_2 | val; in _nx_ip_packet_send()
Dnx_icmpv6_send_queued_packets.c87 NX_IPV6_HEADER *ip_header_ptr; in _nx_icmpv6_send_queued_packets() local
136 ip_header_ptr = (NX_IPV6_HEADER *)ip_packet_ptr -> nx_packet_prepend_ptr; in _nx_icmpv6_send_queued_packets()
139 NX_IPV6_ADDRESS_CHANGE_ENDIAN(ip_header_ptr -> nx_ip_header_destination_ip); in _nx_icmpv6_send_queued_packets()
142 …status = _nx_icmpv6_dest_table_find(ip_ptr, ip_header_ptr -> nx_ip_header_destination_ip, &dest_en… in _nx_icmpv6_send_queued_packets()
145 NX_IPV6_ADDRESS_CHANGE_ENDIAN(ip_header_ptr -> nx_ip_header_destination_ip); in _nx_icmpv6_send_queued_packets()
Dnx_ip_packet_checksum_compute.c97 NX_IPV4_HEADER *ip_header_ptr; in _nx_ip_packet_checksum_compute() local
136 ip_header_ptr = (NX_IPV4_HEADER *)packet_ptr -> nx_packet_prepend_ptr; in _nx_ip_packet_checksum_compute()
139 val = ip_header_ptr -> nx_ip_header_word_0; in _nx_ip_packet_checksum_compute()
164 ip_header_ptr -> nx_ip_header_word_2 = ip_header_ptr -> nx_ip_header_word_2 | val; in _nx_ip_packet_checksum_compute()
172 ip_src_addr[0] = ip_header_ptr -> nx_ip_header_source_ip; in _nx_ip_packet_checksum_compute()
173 ip_dst_addr[0] = ip_header_ptr -> nx_ip_header_destination_ip; in _nx_ip_packet_checksum_compute()
178 val = ip_header_ptr -> nx_ip_header_word_2; in _nx_ip_packet_checksum_compute()
Dnx_icmpv6_process_packet_too_big.c104 NX_IPV6_HEADER *ip_header_ptr, *original_ip_header_ptr; in _nx_icmpv6_process_packet_too_big() local
145 ip_header_ptr = (NX_IPV6_HEADER *)packet_ptr -> nx_packet_ip_header; in _nx_icmpv6_process_packet_too_big()
151 COPY_IPV6_ADDRESS(ip_header_ptr -> nx_ip_header_source_ip, &default_next_hop_address[0]); in _nx_icmpv6_process_packet_too_big()
Dnx_icmpv4_packet_process.c92 NX_IPV4_HEADER *ip_header_ptr; in _nx_icmpv4_packet_process() local
173 ip_header_ptr = (NX_IPV4_HEADER *)packet_ptr -> nx_packet_ip_header; in _nx_icmpv4_packet_process()
176 …NX_TRACE_IN_LINE_INSERT(NX_TRACE_INTERNAL_ICMP_RECEIVE, ip_ptr, ip_header_ptr -> nx_ip_header_sour… in _nx_icmpv4_packet_process()
Dnx_ipv6_option_error.c88 NX_IPV6_HEADER *ip_header_ptr = (NX_IPV6_HEADER *)packet_ptr -> nx_packet_ip_header; in _nx_ipv6_option_error() local
96 … if ((ip_header_ptr -> nx_ip_header_destination_ip[0] & (ULONG)0xFF000000) == (ULONG)0xFF000000) in _nx_ipv6_option_error()
Dnx_tcp_no_connection_reset.c108 NX_IPV4_HEADER *ip_header_ptr; in _nx_tcp_no_connection_reset() local
112 ip_header_ptr = (NX_IPV4_HEADER *)packet_ptr -> nx_packet_ip_header; in _nx_tcp_no_connection_reset()
116 … fake_socket.nx_tcp_socket_connect_ip.nxd_ip_address.v4 = ip_header_ptr -> nx_ip_header_source_ip; in _nx_tcp_no_connection_reset()
134 destination_ip.nxd_ip_address.v4 = ip_header_ptr -> nx_ip_header_source_ip; in _nx_tcp_no_connection_reset()
Dnx_ipv4_option_process.c77 NX_IPV4_HEADER *ip_header_ptr; in _nx_ipv4_option_process() local
93 ip_header_ptr = (NX_IPV4_HEADER *)(packet_ptr -> nx_packet_prepend_ptr); in _nx_ipv4_option_process()
97 …ip_option_length = ((((ip_header_ptr -> nx_ip_header_word_0 & NX_IP_LENGTH_MASK) >> 24) - NX_IP_NO… in _nx_ipv4_option_process()
Dnx_tcp_packet_process.c143 NX_IPV4_HEADER *ip_header_ptr; in _nx_tcp_packet_process() local
146 ip_header_ptr = (NX_IPV4_HEADER *)packet_ptr -> nx_packet_ip_header; in _nx_tcp_packet_process()
148 source_ip = &ip_header_ptr -> nx_ip_header_source_ip; in _nx_tcp_packet_process()
150 dest_ip = &ip_header_ptr -> nx_ip_header_destination_ip; in _nx_tcp_packet_process()
/NetX-Duo-v6.3.0/addons/azure_iot/azure_iot_security_module/src/collectors/
Dcollector_network_activity.c450 uint32_t *ip_header_ptr = (uint32_t*)ip_packet; in _ipv4_callback() local
451 …word_0 = (ip_header_byte_order == BYTE_ORDER_NETWORK) ? ntohl(ip_header_ptr[0]) : ip_header_ptr[0]; in _ipv4_callback()
456 …l_word = (ip_header_byte_order == BYTE_ORDER_NETWORK) ? ntohl(ip_header_ptr[2]) : ip_header_ptr[2]; in _ipv4_callback()
501 …address = (ip_header_byte_order == BYTE_ORDER_NETWORK) ? ip_header_ptr[4] : ntohl(ip_header_ptr[4]… in _ipv4_callback()
502 …address = (ip_header_byte_order == BYTE_ORDER_NETWORK) ? ip_header_ptr[3] : ntohl(ip_header_ptr[3]… in _ipv4_callback()
511 …address = (ip_header_byte_order == BYTE_ORDER_NETWORK) ? ip_header_ptr[3] : ntohl(ip_header_ptr[3]… in _ipv4_callback()
512 …address = (ip_header_byte_order == BYTE_ORDER_NETWORK) ? ip_header_ptr[4] : ntohl(ip_header_ptr[4]… in _ipv4_callback()
546 uint32_t *ip_header_ptr = (uint32_t*)ip_packet; in _ipv6_callback() local
549 …word_1 = (ip_header_byte_order == BYTE_ORDER_NETWORK) ? ntohl(ip_header_ptr[1]) : ip_header_ptr[1]; in _ipv6_callback()
649 memmove(result->local_address, ip_header_ptr + 6, 16); in _ipv6_callback()
[all …]
/NetX-Duo-v6.3.0/addons/nat/
Dnx_nat.c1180 NX_IPV4_HEADER *ip_header_ptr; in _nx_nat_process_packet() local
1193 ip_header_ptr = (NX_IPV4_HEADER *) packet_ptr -> nx_packet_prepend_ptr; in _nx_nat_process_packet()
1196 protocol = (ip_header_ptr -> nx_ip_header_word_2 >> 16) & 0xFF; in _nx_nat_process_packet()
1254 … if (ip_header_ptr -> nx_ip_header_destination_ip != interface_ptr -> nx_interface_ip_address) in _nx_nat_process_packet()
1289 (ip_header_ptr -> nx_ip_header_destination_ip == 0) || in _nx_nat_process_packet()
1292 (ip_header_ptr -> nx_ip_header_destination_ip == NX_IP_LIMITED_BROADCAST) || in _nx_nat_process_packet()
1295 … ((ip_header_ptr -> nx_ip_header_destination_ip & NX_IP_CLASS_D_MASK) == NX_IP_CLASS_D_TYPE) || in _nx_nat_process_packet()
1298 ((ip_header_ptr -> nx_ip_header_destination_ip >= NX_IP_LOOPBACK_FIRST) && in _nx_nat_process_packet()
1299 (ip_header_ptr -> nx_ip_header_destination_ip <= NX_IP_LOOPBACK_LAST))) in _nx_nat_process_packet()
1310 …if(_nx_ip_route_find(ip_ptr, ip_header_ptr -> nx_ip_header_destination_ip, &interface_ptr, &next_h… in _nx_nat_process_packet()
[all …]
/NetX-Duo-v6.3.0/addons/dhcp/
Dnxd_dhcp_client.c7056 NX_IPV4_HEADER *ip_header_ptr; in _nx_dhcp_client_send_with_zero_source_address() local
7178 ip_header_ptr = (NX_IPV4_HEADER *) packet_ptr -> nx_packet_prepend_ptr; in _nx_dhcp_client_send_with_zero_source_address()
7183ip_header_ptr -> nx_ip_header_word_0 = (NX_IP_VERSION | socket_ptr -> nx_udp_socket_type_of_servi… in _nx_dhcp_client_send_with_zero_source_address()
7187ip_header_ptr -> nx_ip_header_word_1 = (((ULONG)NX_RAND()) << NX_SHIFT_BY_16) | socket_ptr -> nx_… in _nx_dhcp_client_send_with_zero_source_address()
7189ip_header_ptr -> nx_ip_header_word_1 = (ip_ptr -> nx_ip_packet_id++ << NX_SHIFT_BY_16) | socket_p… in _nx_dhcp_client_send_with_zero_source_address()
7193ip_header_ptr -> nx_ip_header_word_2 = ((socket_ptr -> nx_udp_socket_time_to_live << NX_IP_TIME_T… in _nx_dhcp_client_send_with_zero_source_address()
7196 ip_header_ptr -> nx_ip_header_source_ip = ip_src_addr; in _nx_dhcp_client_send_with_zero_source_address()
7199 ip_header_ptr -> nx_ip_header_destination_ip = ip_dest_addr; in _nx_dhcp_client_send_with_zero_source_address()
7203 NX_CHANGE_ULONG_ENDIAN(ip_header_ptr -> nx_ip_header_word_0); in _nx_dhcp_client_send_with_zero_source_address()
7204 NX_CHANGE_ULONG_ENDIAN(ip_header_ptr -> nx_ip_header_word_1); in _nx_dhcp_client_send_with_zero_source_address()
[all …]
Dnxd_dhcp_server.c4888 NX_IPV4_HEADER *ip_header_ptr; in _nx_dhcp_server_extract_information() local
4931ip_header_ptr = (NX_IPV4_HEADER *)(packet_ptr -> nx_packet_prepend_ptr - sizeof(NX_UDP_HEADER) - s… in _nx_dhcp_server_extract_information()
4933 temp_client_rec_ptr -> nx_dhcp_source_ip_address = ip_header_ptr -> nx_ip_header_source_ip; in _nx_dhcp_server_extract_information()
4934 …temp_client_rec_ptr -> nx_dhcp_destination_ip_address = ip_header_ptr -> nx_ip_header_destination_… in _nx_dhcp_server_extract_information()
/NetX-Duo-v6.3.0/addons/BSD/
Dnxd_bsd.c9100 NX_IPV4_HEADER *ip_header_ptr; in nx_bsd_raw_packet_info_extract() local
9103ip_header_ptr = (NX_IPV4_HEADER *)(packet_ptr -> nx_packet_prepend_ptr - sizeof(NX_IPV4_HEADER)); in nx_bsd_raw_packet_info_extract()
9107 address -> nxd_ip_address.v4 = ip_header_ptr -> nx_ip_header_source_ip; in nx_bsd_raw_packet_info_extract()
11043 NX_IPV4_HEADER *ip_header_ptr; in _nxd_bsd_ipv4_packet_send() local
11068 ip_header_ptr = (NX_IPV4_HEADER *) packet_ptr -> nx_packet_prepend_ptr; in _nxd_bsd_ipv4_packet_send()
11070 destination_ip = ip_header_ptr -> nx_ip_header_destination_ip; in _nxd_bsd_ipv4_packet_send()
11078 (UINT)((*(UCHAR*)ip_header_ptr & 0xf) << 2), in _nxd_bsd_ipv4_packet_send()
11089 ip_header_ptr -> nx_ip_header_word_2 = ip_header_ptr -> nx_ip_header_word_2 | val; in _nxd_bsd_ipv4_packet_send()
11946 NX_IPV6_HEADER *ip_header_ptr; in _nxd_bsd_ipv6_packet_send() local
11984 ip_header_ptr = (NX_IPV6_HEADER*)packet_ptr -> nx_packet_prepend_ptr; in _nxd_bsd_ipv6_packet_send()
[all …]