1
10
13
14
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
95
96
97
98
99
100
105
106
109
110
111
117
118
119
120
121
122
123
124
125
126
127
...
...
...
#define NX_SOURCE_CODE
#include "nx_api.h"
#include "nx_ipv6.h"
#include "nx_icmpv6.h"
#ifdef FEATURE_NX_IPV6
...
UINT _nx_ipv6_process_routing_option(NX_IP *ip_ptr, NX_PACKET *packet_ptr)
{
NX_IPV6_HEADER_ROUTING_OPTION *option;
#ifndef NX_DISABLE_ICMPV6_ERROR_MESSAGE
UINT base_offset;
#endif
NX_PACKET_DEBUG(__FILE__, __LINE__, packet_ptr);
if (packet_ptr -> nx_packet_length < sizeof(NX_IPV6_HEADER_ROUTING_OPTION))
{
return(NX_OPTION_HEADER_ERROR);
}if (packet_ptr -> nx_packet_length < sizeof(NX_IPV6_HEADER_ROUTING_OPTION)) { ... }
option = (NX_IPV6_HEADER_ROUTING_OPTION *)(packet_ptr -> nx_packet_prepend_ptr);
if (option -> nx_ipv6_header_routing_option_segments_left == 0)
{
return(NX_SUCCESS);
}if (option -> nx_ipv6_header_routing_option_segments_left == 0) { ... }
/* ... */
#ifndef NX_DISABLE_ICMPV6_ERROR_MESSAGE
base_offset = (UINT)(packet_ptr -> nx_packet_prepend_ptr - packet_ptr -> nx_packet_ip_header);
NX_ICMPV6_SEND_PARAMETER_PROBLEM(ip_ptr, packet_ptr, 0, base_offset + 2);/* ... */
#else
NX_PARAMETER_NOT_USED(ip_ptr);
#endif
return(NX_OPTION_HEADER_ERROR);
}_nx_ipv6_process_routing_option (NX_IP *ip_ptr, NX_PACKET *packet_ptr) { ... }
/* ... */
#endif