/NetX-Duo-v6.3.0/common/src/ |
D | nx_ip_checksum_compute.c | 85 ULONG checksum = 0; in _nx_ip_checksum_compute() local 109 checksum = protocol; in _nx_ip_checksum_compute() 121 checksum += src_ip_short[0]; in _nx_ip_checksum_compute() 122 checksum += src_ip_short[1]; in _nx_ip_checksum_compute() 123 checksum += dest_ip_short[0]; in _nx_ip_checksum_compute() 124 checksum += dest_ip_short[1]; in _nx_ip_checksum_compute() 136 checksum += dest_ip_short[i]; in _nx_ip_checksum_compute() 137 checksum += src_ip_short[i]; in _nx_ip_checksum_compute() 143 checksum += data_length; in _nx_ip_checksum_compute() 146 checksum = (checksum >> 16) + (checksum & 0xFFFF); in _nx_ip_checksum_compute() [all …]
|
D | nx_ip_packet_checksum_compute.c | 87 ULONG checksum; in _nx_ip_packet_checksum_compute() local 151 checksum = _nx_ip_checksum_compute(packet_ptr, NX_IP_VERSION_V4, in _nx_ip_packet_checksum_compute() 157 val = (ULONG)(~checksum); in _nx_ip_packet_checksum_compute() 197 checksum = _nx_ip_checksum_compute(packet_ptr, NX_PROTOCOL_TCP, in _nx_ip_packet_checksum_compute() 205 checksum = ~checksum & NX_LOWER_16_MASK; in _nx_ip_packet_checksum_compute() 209 tcp_header_ptr -> nx_tcp_header_word_4 |= (checksum << NX_SHIFT_BY_16); in _nx_ip_packet_checksum_compute() 229 checksum = _nx_ip_checksum_compute(packet_ptr, NX_PROTOCOL_UDP, in _nx_ip_packet_checksum_compute() 239 …tr -> nx_udp_header_word_1 = udp_header_ptr -> nx_udp_header_word_1 | (~checksum & NX_LOWER_16_MAS… in _nx_ip_packet_checksum_compute() 260 checksum = _nx_ip_checksum_compute(packet_ptr, NX_IP_ICMP, in _nx_ip_packet_checksum_compute() 271 …nx_icmp_header_word_0 = icmpv4_header_ptr -> nx_icmp_header_word_0 | (~checksum & NX_LOWER_16_MAS… in _nx_ip_packet_checksum_compute() [all …]
|
D | nx_igmp_interface_report_send.c | 96 ULONG checksum; in _nx_igmp_interface_report_send() local 209 checksum = (temp >> NX_SHIFT_BY_16); in _nx_igmp_interface_report_send() 210 checksum += (temp & NX_LOWER_16_MASK); in _nx_igmp_interface_report_send() 212 checksum += (temp >> NX_SHIFT_BY_16); in _nx_igmp_interface_report_send() 213 checksum += (temp & NX_LOWER_16_MASK); in _nx_igmp_interface_report_send() 216 checksum = (checksum >> NX_SHIFT_BY_16) + (checksum & NX_LOWER_16_MASK); in _nx_igmp_interface_report_send() 219 checksum = (checksum >> NX_SHIFT_BY_16) + (checksum & NX_LOWER_16_MASK); in _nx_igmp_interface_report_send() 222 …header_ptr -> nx_igmp_header_word_0 = header_ptr -> nx_igmp_header_word_0 | (~checksum & NX_LOWER… in _nx_igmp_interface_report_send()
|
D | nx_ip_forward_packet_process.c | 96 ULONG checksum; in _nx_ip_forward_packet_process() local 204 checksum = ip_header_ptr -> nx_ip_header_word_2 & NX_LOWER_16_MASK; in _nx_ip_forward_packet_process() 214 checksum = ((~checksum) & 0xFFFF) + ((~old_m) & 0xFFFF) + new_m; in _nx_ip_forward_packet_process() 217 checksum = (checksum >> 16) + (checksum & 0xFFFF); in _nx_ip_forward_packet_process() 220 checksum = (checksum >> 16) + (checksum & 0xFFFF); in _nx_ip_forward_packet_process() 223 …der_word_2 = ((ip_header_ptr -> nx_ip_header_word_2 & 0xFFFF0000) | ((~checksum) & NX_LOWER_16_MA… in _nx_ip_forward_packet_process()
|
D | nx_icmpv4_process_echo_request.c | 87 ULONG checksum; in _nx_icmpv4_process_echo_request() local 214 checksum = header_ptr -> nx_icmpv4_header_checksum; in _nx_icmpv4_process_echo_request() 221 checksum = ((~checksum) & 0xFFFF) + ((~old_m) & 0xFFFF); in _nx_icmpv4_process_echo_request() 224 checksum = (checksum >> 16) + (checksum & 0xFFFF); in _nx_icmpv4_process_echo_request() 227 checksum = (checksum >> 16) + (checksum & 0xFFFF); in _nx_icmpv4_process_echo_request() 230 header_ptr -> nx_icmpv4_header_checksum = (~checksum & NX_LOWER_16_MASK); in _nx_icmpv4_process_echo_request()
|
D | nx_ip_fragment_forward_packet.c | 88 ULONG checksum; in _nx_ip_fragment_forward_packet() local 323 checksum = (temp >> NX_SHIFT_BY_16) + (temp & NX_LOWER_16_MASK); in _nx_ip_fragment_forward_packet() 325 checksum += (temp >> NX_SHIFT_BY_16) + (temp & NX_LOWER_16_MASK); in _nx_ip_fragment_forward_packet() 327 checksum += (temp >> NX_SHIFT_BY_16); in _nx_ip_fragment_forward_packet() 329 checksum += (temp >> NX_SHIFT_BY_16) + (temp & NX_LOWER_16_MASK); in _nx_ip_fragment_forward_packet() 331 checksum += (temp >> NX_SHIFT_BY_16) + (temp & NX_LOWER_16_MASK); in _nx_ip_fragment_forward_packet() 334 checksum = (checksum >> NX_SHIFT_BY_16) + (checksum & NX_LOWER_16_MASK); in _nx_ip_fragment_forward_packet() 337 checksum = (checksum >> NX_SHIFT_BY_16) + (checksum & NX_LOWER_16_MASK); in _nx_ip_fragment_forward_packet() 340 …_ip_header_word_2 = fragment_header_ptr -> nx_ip_header_word_2 | (NX_LOWER_16_MASK & (~checksum)); in _nx_ip_fragment_forward_packet()
|
D | nx_ip_fragment_packet.c | 85 ULONG checksum; in _nx_ip_fragment_packet() local 332 checksum = (temp >> NX_SHIFT_BY_16) + (temp & NX_LOWER_16_MASK); in _nx_ip_fragment_packet() 334 checksum += (temp >> NX_SHIFT_BY_16) + (temp & NX_LOWER_16_MASK); in _nx_ip_fragment_packet() 336 checksum += (temp >> NX_SHIFT_BY_16); in _nx_ip_fragment_packet() 338 checksum += (temp >> NX_SHIFT_BY_16) + (temp & NX_LOWER_16_MASK); in _nx_ip_fragment_packet() 340 checksum += (temp >> NX_SHIFT_BY_16) + (temp & NX_LOWER_16_MASK); in _nx_ip_fragment_packet() 343 checksum = (checksum >> NX_SHIFT_BY_16) + (checksum & NX_LOWER_16_MASK); in _nx_ip_fragment_packet() 346 checksum = (checksum >> NX_SHIFT_BY_16) + (checksum & NX_LOWER_16_MASK); in _nx_ip_fragment_packet() 349 …_ip_header_word_2 = fragment_header_ptr -> nx_ip_header_word_2 | (NX_LOWER_16_MASK & (~checksum)); in _nx_ip_fragment_packet()
|
D | nx_icmpv4_packet_process.c | 87 USHORT checksum; in _nx_icmpv4_packet_process() local 125 checksum = _nx_ip_checksum_compute(packet_ptr, NX_IP_ICMP, in _nx_icmpv4_packet_process() 131 checksum = ((USHORT) ~checksum) & NX_LOWER_16_MASK; in _nx_icmpv4_packet_process() 134 if (checksum) in _nx_icmpv4_packet_process()
|
D | nx_icmpv6_send_rs.c | 86 USHORT checksum; in _nx_icmpv6_send_rs() local 193 checksum = _nx_ip_checksum_compute(pkt_ptr, NX_PROTOCOL_ICMPV6, in _nx_icmpv6_send_rs() 198 checksum = (USHORT)(~checksum); in _nx_icmpv6_send_rs() 201 NX_CHANGE_USHORT_ENDIAN(checksum); in _nx_icmpv6_send_rs() 203 rs_ptr -> nx_icmpv6_rs_icmpv6_header.nx_icmpv6_header_checksum = checksum; in _nx_icmpv6_send_rs()
|
D | nx_icmpv6_packet_process.c | 108 USHORT checksum; in _nx_icmpv6_packet_process() local 160 checksum = _nx_ip_checksum_compute(packet_ptr, NX_PROTOCOL_ICMPV6, in _nx_icmpv6_packet_process() 165 checksum = (USHORT)(~checksum) & NX_LOWER_16_MASK; in _nx_icmpv6_packet_process() 168 if (checksum) in _nx_icmpv6_packet_process()
|
D | nx_igmp_packet_process.c | 92 ULONG checksum; in _nx_igmp_packet_process() local 109 checksum = _nx_ip_checksum_compute(packet_ptr, NX_IP_IGMP, in _nx_igmp_packet_process() 113 checksum = ~checksum & NX_LOWER_16_MASK; in _nx_igmp_packet_process() 116 if (checksum) in _nx_igmp_packet_process()
|
D | nx_icmpv6_send_ns.c | 101 USHORT checksum; in _nx_icmpv6_send_ns() local 253 …checksum = _nx_ip_checksum_compute(pkt_ptr, NX_PROTOCOL_ICMPV6, (UINT)pkt_ptr -> nx_packet_length,… in _nx_icmpv6_send_ns() 255 checksum = (USHORT)(~checksum); in _nx_icmpv6_send_ns() 258 NX_CHANGE_USHORT_ENDIAN(checksum); in _nx_icmpv6_send_ns() 260 nd_ptr -> nx_icmpv6_nd_header.nx_icmpv6_header_checksum = checksum; in _nx_icmpv6_send_ns()
|
D | nx_udp_socket_receive.c | 286 ULONG checksum; in _nx_udp_socket_receive() local 328 checksum = _nx_ip_checksum_compute(current_ptr, NX_PROTOCOL_UDP, in _nx_udp_socket_receive() 341 checksum = NX_LOWER_16_MASK & ~checksum; in _nx_udp_socket_receive() 344 if (checksum == 0) in _nx_udp_socket_receive()
|
D | nx_tcp_packet_send_control.c | 97 ULONG checksum; in _nx_tcp_packet_send_control() local 306 checksum = _nx_ip_checksum_compute(packet_ptr, NX_PROTOCOL_TCP, in _nx_tcp_packet_send_control() 309 checksum = ~checksum & NX_LOWER_16_MASK; in _nx_tcp_packet_send_control() 313 tcp_header_ptr -> nx_tcp_header_word_4 = (checksum << NX_SHIFT_BY_16); in _nx_tcp_packet_send_control()
|
D | nxd_udp_socket_send.c | 565 ULONG checksum; in _nxd_udp_socket_send() local 568 checksum = _nx_ip_checksum_compute(packet_ptr, in _nxd_udp_socket_send() 573 checksum = ~checksum & NX_LOWER_16_MASK; in _nxd_udp_socket_send() 577 if (checksum == 0) in _nxd_udp_socket_send() 579 checksum = 0xFFFF; in _nxd_udp_socket_send() 584 … udp_header_ptr -> nx_udp_header_word_1 = udp_header_ptr -> nx_udp_header_word_1 | checksum; in _nxd_udp_socket_send()
|
D | nx_tcp_socket_retransmit.c | 212 ULONG checksum; in _nx_tcp_socket_retransmit() local 330 checksum = _nx_ip_checksum_compute(packet_ptr, NX_PROTOCOL_TCP, in _nx_tcp_socket_retransmit() 333 checksum = ~checksum & NX_LOWER_16_MASK; in _nx_tcp_socket_retransmit() 339 …header_ptr -> nx_tcp_header_word_4 = header_ptr -> nx_tcp_header_word_4 | (checksum << NX_SHIFT_B… in _nx_tcp_socket_retransmit()
|
D | nx_icmpv6_process_echo_request.c | 94 USHORT checksum; in _nx_icmpv6_process_echo_request() local 280 checksum = header_ptr -> nx_icmpv6_header_checksum; in _nx_icmpv6_process_echo_request() 283 NX_CHANGE_USHORT_ENDIAN(checksum); in _nx_icmpv6_process_echo_request() 285 tmp = ((USHORT)(~checksum) & 0xFFFF); in _nx_icmpv6_process_echo_request()
|
D | nx_ip_header_add.c | 96 ULONG checksum; in _nx_ip_header_add() local 232 checksum = _nx_ip_checksum_compute(packet_ptr, NX_IP_VERSION_V4, in _nx_ip_header_add() 238 val = (ULONG)(~checksum); in _nx_ip_header_add()
|
D | nx_ipv4_packet_receive.c | 103 ULONG checksum; in _nx_ipv4_packet_receive() local 301 checksum = _nx_ip_checksum_compute(packet_ptr, NX_IP_VERSION_V4, in _nx_ipv4_packet_receive() 306 checksum = ~checksum & NX_LOWER_16_MASK; in _nx_ipv4_packet_receive() 309 if (checksum) in _nx_ipv4_packet_receive()
|
D | nx_icmpv4_send_error_message.c | 94 USHORT checksum; in _nx_icmpv4_send_error_message() local 312 checksum = _nx_ip_checksum_compute(pkt_ptr, NX_IP_ICMP, in _nx_icmpv4_send_error_message() 318 icmpv4_error -> nx_icmpv4_error_header.nx_icmpv4_header_checksum = (USHORT)(~checksum); in _nx_icmpv4_send_error_message()
|
D | nx_ip_packet_send.c | 103 ULONG checksum; in _nx_ip_packet_send() local 283 checksum = _nx_ip_checksum_compute(packet_ptr, NX_IP_VERSION_V4, in _nx_ip_packet_send() 289 val = (ULONG)(~checksum); in _nx_ip_packet_send()
|
D | nx_icmpv6_send_error_message.c | 104 USHORT checksum; in _nx_icmpv6_send_error_message() local 353 checksum = _nx_ip_checksum_compute(pkt_ptr, NX_PROTOCOL_ICMPV6, in _nx_icmpv6_send_error_message() 358 icmpv6_error -> nx_icmpv6_error_header.nx_icmpv6_header_checksum = (USHORT)(~checksum); in _nx_icmpv6_send_error_message()
|
D | nx_icmp_interface_ping.c | 108 ULONG checksum; in _nx_icmp_interface_ping() local 261 checksum = _nx_ip_checksum_compute(request_ptr, NX_IP_ICMP, in _nx_icmp_interface_ping() 272 …header_ptr -> nx_icmp_header_word_0 = header_ptr -> nx_icmp_header_word_0 | (~checksum & NX_LOWER… in _nx_icmp_interface_ping()
|
D | nx_icmp_interface_ping6.c | 115 ULONG checksum; in _nx_icmp_interface_ping6() local 284 checksum = _nx_ip_checksum_compute(request_ptr, NX_PROTOCOL_ICMPV6, in _nx_icmp_interface_ping6() 289 echo_header_ptr -> nx_icmpv6_echo_header.nx_icmpv6_header_checksum = (USHORT) ~checksum; in _nx_icmp_interface_ping6()
|
/NetX-Duo-v6.3.0/addons/nat/ |
D | nx_nat.c | 78 static VOID _nx_nat_checksum_adjust(UCHAR *checksum, UCHAR *old_data, INT old_data_length, UCHAR… 1511 USHORT checksum; in _nx_nat_process_inbound_TCP_packet() local 1587 checksum = (USHORT)(tcp_header_ptr -> nx_tcp_header_word_4 >> NX_SHIFT_BY_16); in _nx_nat_process_inbound_TCP_packet() 1598 …_nx_nat_checksum_adjust((UCHAR *)&checksum, (UCHAR *)&old_port, sizeof(USHORT), (UCHAR *)&new_port… in _nx_nat_process_inbound_TCP_packet() 1606 …_nx_nat_checksum_adjust((UCHAR *)&checksum, (UCHAR *)&old_address, sizeof(LONG), (UCHAR *)&new_add… in _nx_nat_process_inbound_TCP_packet() 1612 …nx_tcp_header_word_4 = tcp_header_ptr -> nx_tcp_header_word_4 | (ULONG)(checksum << NX_SHIFT_BY_16… in _nx_nat_process_inbound_TCP_packet() 1714 USHORT checksum; in _nx_nat_process_inbound_UDP_packet() local 1785 checksum = udp_header_ptr -> nx_udp_header_word_1 & NX_LOWER_16_MASK; in _nx_nat_process_inbound_UDP_packet() 1788 if (checksum == 0) in _nx_nat_process_inbound_UDP_packet() 1804 …_nx_nat_checksum_adjust((UCHAR *)&checksum, (UCHAR *)&old_port, sizeof(USHORT), (UCHAR *)&new_port… in _nx_nat_process_inbound_UDP_packet() [all …]
|