1 /**************************************************************************/
2 /* */
3 /* Copyright (c) Microsoft Corporation. All rights reserved. */
4 /* */
5 /* This software is licensed under the Microsoft Software License */
6 /* Terms for Microsoft Azure RTOS. Full text of the license can be */
7 /* found in the LICENSE file at https://aka.ms/AzureRTOS_EULA */
8 /* and in the root directory of this software. */
9 /* */
10 /**************************************************************************/
11
12
13 /**************************************************************************/
14 /**************************************************************************/
15 /** */
16 /** NetX Component */
17 /** */
18 /** Internet Control Message Protocol (ICMP) */
19 /** */
20 /**************************************************************************/
21 /**************************************************************************/
22
23 #define NX_SOURCE_CODE
24
25
26
27 /* Include necessary system files. */
28
29 #include "nx_api.h"
30 #include "nx_ip.h"
31 #include "nx_icmp.h"
32
33
34 /* Bring in externs for caller checking code. */
35
36
37
38 NX_CALLER_CHECKING_EXTERNS
39
40
41 /**************************************************************************/
42 /* */
43 /* FUNCTION RELEASE */
44 /* */
45 /* _nxde_icmp_enable PORTABLE C */
46 /* 6.1 */
47 /* AUTHOR */
48 /* */
49 /* Yuxin Zhou, Microsoft Corporation */
50 /* */
51 /* DESCRIPTION */
52 /* */
53 /* This function checks for errors in the ICMPv4/ICMPv6 enable function*/
54 /* call. */
55 /* */
56 /* INPUT */
57 /* */
58 /* ip_ptr IP instance pointer */
59 /* */
60 /* OUTPUT */
61 /* */
62 /* status Completion status */
63 /* */
64 /* CALLS */
65 /* */
66 /* _nxd_icmp_enable Actual ICMP enable function */
67 /* */
68 /* CALLED BY */
69 /* */
70 /* Application Code */
71 /* */
72 /* RELEASE HISTORY */
73 /* */
74 /* DATE NAME DESCRIPTION */
75 /* */
76 /* 05-19-2020 Yuxin Zhou Initial Version 6.0 */
77 /* 09-30-2020 Yuxin Zhou Modified comment(s), */
78 /* resulting in version 6.1 */
79 /* */
80 /**************************************************************************/
_nxde_icmp_enable(NX_IP * ip_ptr)81 UINT _nxde_icmp_enable(NX_IP *ip_ptr)
82 {
83
84 UINT status;
85
86
87 /* Check for invalid input pointers. */
88 if ((ip_ptr == NX_NULL) || (ip_ptr -> nx_ip_id != NX_IP_ID))
89 {
90 return(NX_PTR_ERROR);
91 }
92
93 /* Check for appropriate caller. */
94 NX_INIT_AND_THREADS_CALLER_CHECKING
95
96 /* Call actual ICMP enable function. */
97 status = _nxd_icmp_enable(ip_ptr);
98
99 /* Return completion status. */
100 return(status);
101 }
102
103