- NDK 0.98, now with versionned headers. Too many changes to list, see the TinyKRNL...
[reactos.git] / reactos / lib / rtl / network.c
1 /*
2 * COPYRIGHT: See COPYING in the top level directory
3 * PROJECT: ReactOS Runtime Library
4 * PURPOSE: Network Address Translation implementation
5 * PROGRAMMER: Alex Ionescu (alexi@tinykrnl.org)
6 */
7
8 /* INCLUDES *****************************************************************/
9
10 #include <rtl.h>
11
12 #define NDEBUG
13 #include <debug.h>
14
15 /* FUNCTIONS ***************************************************************/
16
17 /*
18 * @implemented
19 */
20 LPSTR
21 NTAPI
22 RtlIpv4AddressToStringA(IN struct in_addr *Addr,
23 OUT PCHAR S)
24 {
25 return S + sprintf(S, "%u.%u.%u.%u", Addr->S_un.S_un_b.s_b1,
26 Addr->S_un.S_un_b.s_b2,
27 Addr->S_un.S_un_b.s_b3,
28 Addr->S_un.S_un_b.s_b4);
29 }
30
31 /*
32 * @unimplemented
33 */
34 NTSTATUS
35 NTAPI
36 RtlIpv4AddressToStringExA(IN struct in_addr *Address,
37 IN USHORT Port,
38 OUT PCHAR AddressString,
39 IN OUT PULONG AddressStringLength)
40 {
41 UNIMPLEMENTED;
42 return STATUS_NOT_IMPLEMENTED;
43 }
44
45 /*
46 * @implemented
47 */
48 LPWSTR
49 NTAPI
50 RtlIpv4AddressToStringW(IN struct in_addr *Addr,
51 OUT PWCHAR S)
52 {
53 return S + swprintf(S, L"%u.%u.%u.%u", Addr->S_un.S_un_b.s_b1,
54 Addr->S_un.S_un_b.s_b2,
55 Addr->S_un.S_un_b.s_b3,
56 Addr->S_un.S_un_b.s_b4);
57 }
58
59 /*
60 * @unimplemented
61 */
62 NTSTATUS
63 NTAPI
64 RtlIpv4AddressToStringExW(IN struct in_addr *Address,
65 IN USHORT Port,
66 OUT PWCHAR AddressString,
67 IN OUT PULONG AddressStringLength)
68 {
69 UNIMPLEMENTED;
70 return STATUS_NOT_IMPLEMENTED;
71 }
72
73 /*
74 * @unimplemented
75 */
76 NTSTATUS
77 NTAPI
78 RtlIpv4StringToAddressA(IN PCHAR String,
79 IN BOOLEAN Strict,
80 OUT PCHAR *Terminator,
81 OUT struct in_addr *Addr)
82 {
83 UNIMPLEMENTED;
84 return STATUS_NOT_IMPLEMENTED;
85 }
86
87 /*
88 * @unimplemented
89 */
90 NTSTATUS
91 NTAPI
92 RtlIpv4StringToAddressExA(IN PCHAR AddressString,
93 IN BOOLEAN Strict,
94 OUT struct in_addr *Address,
95 IN PUSHORT Port)
96 {
97 UNIMPLEMENTED;
98 return STATUS_NOT_IMPLEMENTED;
99 }
100
101 /*
102 * @unimplemented
103 */
104 NTSTATUS
105 NTAPI
106 RtlIpv4StringToAddressW(IN PWCHAR String,
107 IN UCHAR Strict,
108 OUT PWCHAR Terminator,
109 OUT struct in_addr *Addr)
110 {
111 UNIMPLEMENTED;
112 return STATUS_NOT_IMPLEMENTED;
113 }
114
115 /*
116 * @unimplemented
117 */
118 NTSTATUS
119 NTAPI
120 RtlIpv4StringToAddressExW(IN PWCHAR AddressString,
121 IN BOOLEAN Strict,
122 OUT struct in_addr *Address,
123 OUT PUSHORT Port)
124 {
125 UNIMPLEMENTED;
126 return STATUS_NOT_IMPLEMENTED;
127 }
128
129 /*
130 * @unimplemented
131 */
132 NTSTATUS
133 NTAPI
134 RtlIpv6AddressToStringA(IN struct in6_addr *Addr,
135 OUT PCHAR S)
136 {
137 UNIMPLEMENTED;
138 return STATUS_NOT_IMPLEMENTED;
139 }
140
141 /*
142 * @unimplemented
143 */
144 NTSTATUS
145 NTAPI
146 RtlIpv6AddressToStringExA(IN struct in6_addr *Address,
147 IN ULONG ScopeId,
148 IN ULONG Port,
149 OUT PCHAR AddressString,
150 IN OUT PULONG AddressStringLength)
151 {
152 UNIMPLEMENTED;
153 return STATUS_NOT_IMPLEMENTED;
154 }
155
156 /*
157 * @unimplemented
158 */
159 NTSTATUS
160 NTAPI
161 RtlIpv6AddressToStringW(IN struct in6_addr *Addr,
162 OUT PWCHAR S)
163 {
164 UNIMPLEMENTED;
165 return STATUS_NOT_IMPLEMENTED;
166 }
167
168 /*
169 * @unimplemented
170 */
171 NTSTATUS
172 NTAPI
173 RtlIpv6AddressToStringExW(IN struct in6_addr *Address,
174 IN ULONG ScopeId,
175 IN USHORT Port,
176 IN OUT PWCHAR AddressString,
177 IN OUT PULONG AddressStringLength)
178 {
179 UNIMPLEMENTED;
180 return STATUS_NOT_IMPLEMENTED;
181 }
182
183 /*
184 * @unimplemented
185 */
186 NTSTATUS
187 NTAPI
188 RtlIpv6StringToAddressA(IN PCHAR Name,
189 OUT PCHAR *Terminator,
190 OUT struct in6_addr *Addr)
191 {
192 UNIMPLEMENTED;
193 return STATUS_NOT_IMPLEMENTED;
194 }
195
196 /*
197 * @unimplemented
198 */
199 NTSTATUS
200 NTAPI
201 RtlIpv6StringToAddressExA(IN PCHAR AddressString,
202 OUT struct in6_addr *Address,
203 OUT PULONG ScopeId,
204 OUT PUSHORT Port)
205 {
206 UNIMPLEMENTED;
207 return STATUS_NOT_IMPLEMENTED;
208 }
209
210 /*
211 * @unimplemented
212 */
213 NTSTATUS
214 NTAPI
215 RtlIpv6StringToAddressW(IN PWCHAR Name,
216 OUT PCHAR *Terminator,
217 OUT struct in6_addr *Addr)
218 {
219 UNIMPLEMENTED;
220 return STATUS_NOT_IMPLEMENTED;
221 }
222
223 /*
224 * @unimplemented
225 */
226 NTSTATUS
227 NTAPI
228 RtlIpv6StringToAddressExW(IN PWCHAR AddressName,
229 OUT struct in6_addr *Address,
230 OUT PULONG ScopeId,
231 OUT PUSHORT Port)
232 {
233 UNIMPLEMENTED;
234 return STATUS_NOT_IMPLEMENTED;
235 }
236
237 /* EOF */