1 /*************************************************************************** 2 * Copyright (c) 2024 Microsoft Corporation 3 * 4 * This program and the accompanying materials are made available under the 5 * terms of the MIT License which is available at 6 * https://opensource.org/licenses/MIT. 7 * 8 * SPDX-License-Identifier: MIT 9 **************************************************************************/ 10 11 12 /**************************************************************************/ 13 /**************************************************************************/ 14 /** */ 15 /** NetX Component */ 16 /** */ 17 /** Hypertext Transfer Protocol (HTTP) */ 18 /** */ 19 /**************************************************************************/ 20 /**************************************************************************/ 21 22 23 /**************************************************************************/ 24 /* */ 25 /* APPLICATION INTERFACE DEFINITION RELEASE */ 26 /* */ 27 /* nxd_http_server.h PORTABLE C */ 28 /* 6.2.0 */ 29 /* AUTHOR */ 30 /* */ 31 /* Yuxin Zhou, Microsoft Corporation */ 32 /* */ 33 /* DESCRIPTION */ 34 /* */ 35 /* This file defines the NetX Hypertext Transfer Protocol (HTTP) */ 36 /* component, including all data types and external references. */ 37 /* It is assumed that nx_api.h and nx_port.h have already been */ 38 /* included, along with fx_api.h and fx_port.h. */ 39 /* */ 40 /* RELEASE HISTORY */ 41 /* */ 42 /* DATE NAME DESCRIPTION */ 43 /* */ 44 /* 05-19-2020 Yuxin Zhou Initial Version 6.0 */ 45 /* 09-30-2020 Yuxin Zhou Modified comment(s), */ 46 /* resulting in version 6.1 */ 47 /* 04-02-2021 Yuxin Zhou Modified comment(s), and */ 48 /* improved the logic of */ 49 /* parsing base64, */ 50 /* resulting in version 6.1.6 */ 51 /* 08-02-2021 Yuxin Zhou Modified comment(s), and */ 52 /* improved the logic of */ 53 /* converting number to string,*/ 54 /* resulting in version 6.1.8 */ 55 /* 10-31-2022 Yuxin Zhou Modified comment(s), and */ 56 /* supported random nonce, */ 57 /* resulting in version 6.2.0 */ 58 /* */ 59 /* */ 60 /**************************************************************************/ 61 62 #ifndef NXD_HTTP_SERVER_H 63 #define NXD_HTTP_SERVER_H 64 65 /* Determine if a C++ compiler is being used. If so, ensure that standard 66 C is used to process the API information. */ 67 68 #ifdef __cplusplus 69 70 /* Yes, C++ compiler is present. Use standard C. */ 71 extern "C" { 72 73 #endif 74 75 #include "nx_api.h" 76 /* If not using FileX, define this option and define the file writing services 77 declared in filex_stub.h. */ 78 /* #define NX_HTTP_NO_FILEX */ 79 80 #ifndef NX_HTTP_NO_FILEX 81 #include "fx_api.h" 82 #else 83 #include "filex_stub.h" 84 #endif 85 86 /* Define the HTTP Server ID. */ 87 88 #define NXD_HTTP_SERVER_ID 0x48545451UL 89 90 91 /* Define the HTTP version. */ 92 #define NX_HTTP_VERSION "HTTP/1.0" 93 94 /* Enable Digest authentication. 95 #define NX_HTTP_DIGEST_ENABLE 96 */ 97 98 /* Define HTTP TCP socket create options. */ 99 100 #ifndef NX_HTTP_TYPE_OF_SERVICE 101 #define NX_HTTP_TYPE_OF_SERVICE NX_IP_NORMAL 102 #endif 103 104 #ifndef NX_HTTP_FRAGMENT_OPTION 105 #define NX_HTTP_FRAGMENT_OPTION NX_DONT_FRAGMENT 106 #endif 107 108 #ifndef NX_HTTP_TIME_TO_LIVE 109 #define NX_HTTP_TIME_TO_LIVE 0x80 110 #endif 111 112 #ifndef NX_HTTP_SERVER_PRIORITY 113 #define NX_HTTP_SERVER_PRIORITY 16 114 #endif 115 116 #ifndef NX_HTTP_SERVER_WINDOW_SIZE 117 #define NX_HTTP_SERVER_WINDOW_SIZE 2048 118 #endif 119 120 #ifndef NX_HTTP_SERVER_TIMEOUT_ACCEPT 121 #define NX_HTTP_SERVER_TIMEOUT_ACCEPT (10 * NX_IP_PERIODIC_RATE) 122 #endif 123 124 #ifndef NX_HTTP_SERVER_TIMEOUT_RECEIVE 125 #define NX_HTTP_SERVER_TIMEOUT_RECEIVE (10 * NX_IP_PERIODIC_RATE) 126 #endif 127 128 #ifndef NX_HTTP_SERVER_TIMEOUT_SEND 129 #define NX_HTTP_SERVER_TIMEOUT_SEND (10 * NX_IP_PERIODIC_RATE) 130 #endif 131 132 #ifndef NX_HTTP_SERVER_TIMEOUT_DISCONNECT 133 #define NX_HTTP_SERVER_TIMEOUT_DISCONNECT (10 * NX_IP_PERIODIC_RATE) 134 #endif 135 136 #ifndef NX_HTTP_SERVER_TIMEOUT 137 #define NX_HTTP_SERVER_TIMEOUT (10 * NX_IP_PERIODIC_RATE) 138 #endif 139 140 #ifndef NX_HTTP_SERVER_MAX_PENDING 141 #define NX_HTTP_SERVER_MAX_PENDING 5 142 #endif 143 144 #ifndef NX_HTTP_SERVER_THREAD_TIME_SLICE 145 #define NX_HTTP_SERVER_THREAD_TIME_SLICE 2 146 #endif 147 148 #ifndef NX_HTTP_MAX_RESOURCE 149 #define NX_HTTP_MAX_RESOURCE 40 150 #endif 151 152 #ifndef NX_HTTP_MAX_NAME 153 #define NX_HTTP_MAX_NAME 20 154 #endif 155 156 #ifndef NX_HTTP_MAX_PASSWORD 157 #define NX_HTTP_MAX_PASSWORD 20 158 #endif 159 160 #ifndef NX_PHYSICAL_TRAILER 161 #define NX_PHYSICAL_TRAILER 4 162 #endif 163 164 #ifndef NX_HTTP_SERVER_MIN_PACKET_SIZE 165 #define NX_HTTP_SERVER_MIN_PACKET_SIZE 600 166 #endif 167 168 /* Define the HTTP server retry parameters. */ 169 170 #ifndef NX_HTTP_SERVER_RETRY_SECONDS 171 #define NX_HTTP_SERVER_RETRY_SECONDS 2 /* 2 second initial timeout */ 172 #endif 173 174 #ifndef NX_HTTP_SERVER_TRANSMIT_QUEUE_DEPTH 175 #define NX_HTTP_SERVER_TRANSMIT_QUEUE_DEPTH 20 /* Maximum of 20 queued transmit packets */ 176 #endif 177 178 #ifndef NX_HTTP_SERVER_RETRY_MAX 179 #define NX_HTTP_SERVER_RETRY_MAX 10 /* Maximum of 10 retries per packet */ 180 #endif 181 182 #ifndef NX_HTTP_SERVER_RETRY_SHIFT 183 #define NX_HTTP_SERVER_RETRY_SHIFT 1 /* Every retry is twice as long */ 184 #endif 185 186 #ifndef NX_HTTP_SERVER_NONCE_SIZE 187 #define NX_HTTP_SERVER_NONCE_SIZE 32 /* The size of nonce for digest authtentication */ 188 #endif 189 190 #ifndef NX_HTTP_SERVER_NONCE_MAX 191 #define NX_HTTP_SERVER_NONCE_MAX 2 /* The size of nonce for digest authtentication */ 192 #endif 193 194 #ifndef NX_HTTP_SERVER_NONCE_TIMEOUT 195 #define NX_HTTP_SERVER_NONCE_TIMEOUT (10 * NX_IP_PERIODIC_RATE) 196 #endif 197 198 /* Define the state of the nonce. */ 199 200 #define NX_HTTP_SERVER_NONCE_INVALID 0 201 #define NX_HTTP_SERVER_NONCE_VALID 1 202 #define NX_HTTP_SERVER_NONCE_ACCEPTED 2 203 204 /* NX_HTTP_MAX_STRING is base64 of "name:password" and plus 1 if an extra conversion is needed and plus 2 pad if needed. */ 205 #define NX_HTTP_MAX_STRING ((NX_HTTP_MAX_NAME + NX_HTTP_MAX_PASSWORD + 1) * 4 / 3 + 1 + 2) 206 207 #define NX_HTTP_MAX_BINARY_MD5 16 208 #define NX_HTTP_MAX_ASCII_MD5 32 209 210 211 /* Define HTTP Server request types. */ 212 213 #define NX_HTTP_SERVER_UNKNOWN_REQUEST 0 214 #define NX_HTTP_SERVER_GET_REQUEST 1 215 #define NX_HTTP_SERVER_POST_REQUEST 2 216 #define NX_HTTP_SERVER_HEAD_REQUEST 3 217 #define NX_HTTP_SERVER_PUT_REQUEST 4 218 #define NX_HTTP_SERVER_DELETE_REQUEST 5 219 220 221 /* Define return code constants. */ 222 223 #define NX_HTTP_ERROR 0xE0 /* HTTP internal error */ 224 #define NX_HTTP_TIMEOUT 0xE1 /* HTTP timeout occurred */ 225 #define NX_HTTP_FAILED 0xE2 /* HTTP error */ 226 #define NX_HTTP_DONT_AUTHENTICATE 0xE3 /* HTTP authentication not needed */ 227 #define NX_HTTP_BASIC_AUTHENTICATE 0xE4 /* HTTP basic authentication requested */ 228 #define NX_HTTP_DIGEST_AUTHENTICATE 0xE5 /* HTTP digest authentication requested */ 229 #define NX_HTTP_NOT_FOUND 0xE6 /* HTTP request not found */ 230 #define NX_HTTP_DATA_END 0xE7 /* HTTP end of content area */ 231 #define NX_HTTP_CALLBACK_COMPLETED 0xE8 /* HTTP user callback completed the processing */ 232 #define NX_HTTP_POOL_ERROR 0xE9 /* HTTP supplied pool payload is too small */ 233 #define NX_HTTP_NOT_READY 0xEA /* HTTP client not ready for operation */ 234 #define NX_HTTP_AUTHENTICATION_ERROR 0xEB /* HTTP client authentication failed */ 235 #define NX_HTTP_GET_DONE 0xEC /* HTTP client get is complete */ 236 #define NX_HTTP_BAD_PACKET_LENGTH 0xED /* Invalid packet received - length incorrect */ 237 #define NX_HTTP_REQUEST_UNSUCCESSFUL_CODE 0xEE /* Received an error code instead of 2xx from server */ 238 #define NX_HTTP_INCOMPLETE_PUT_ERROR 0xEF /* Server responds before PUT is complete */ 239 #define NX_HTTP_PASSWORD_TOO_LONG 0xF0 /* Password exceeded expected length */ 240 #define NX_HTTP_USERNAME_TOO_LONG 0xF1 /* Username exceeded expected length */ 241 #define NX_HTTP_NO_QUERY_PARSED 0xF2 /* Server unable to find query in client request */ 242 #define NX_HTTP_IMPROPERLY_TERMINATED_PARAM 0xF3 /* Client request parameter not properly terminated */ 243 #define NX_HTTP_BOUNDARY_ALREADY_FOUND 0xF4 /* Boundary is already found. */ 244 245 /* Define the HTTP Server TCP port number */ 246 247 #define NX_HTTP_SERVER_PORT 80 /* Port for HTTP server */ 248 249 #ifdef NX_HTTP_DIGEST_ENABLE 250 251 /* Include the MD5 digest header file. */ 252 253 #include "nx_md5.h" 254 255 #endif 256 257 /* Define the status code. */ 258 259 #define NX_HTTP_STATUS_CONTINUE "100 Continue" 260 #define NX_HTTP_STATUS_SWITCHING_PROTOCOLS "101 Switching Protocols" 261 #define NX_HTTP_STATUS_OK "200 OK" 262 #define NX_HTTP_STATUS_CREATED "201 Created" 263 #define NX_HTTP_STATUS_ACCEPTED "202 Accepted" 264 #define NX_HTTP_STATUS_NON_AUTH_INFO "203 Non-Authoritative Information" 265 #define NX_HTTP_STATUS_NO_CONTENT "204 No Content" 266 #define NX_HTTP_STATUS_RESET_CONTENT "205 Reset Content" 267 #define NX_HTTP_STATUS_PARTIAL_CONTENT "206 Partial Content" 268 #define NX_HTTP_STATUS_MULTIPLE_CHOICES "300 Multiple Choices" 269 #define NX_HTTP_STATUS_MOVED_PERMANETLY "301 Moved Permanently" 270 #define NX_HTTP_STATUS_FOUND "302 Found" 271 #define NX_HTTP_STATUS_SEE_OTHER "303 See Other" 272 #define NX_HTTP_STATUS_NOT_MODIFIED "304 Not Modified" 273 #define NX_HTTP_STATUS_USE_PROXY "305 Use Proxy" 274 #define NX_HTTP_STATUS_TEMPORARY_REDIRECT "307 Temporary Redirect" 275 #define NX_HTTP_STATUS_BAD_REQUEST "400 Bad Request" 276 #define NX_HTTP_STATUS_UNAUTHORIZED "401 Unauthorized" 277 #define NX_HTTP_STATUS_PAYMENT_REQUIRED "402 Payment Required" 278 #define NX_HTTP_STATUS_FORBIDDEN "403 Forbidden" 279 #define NX_HTTP_STATUS_NOT_FOUND "404 Not Found" 280 #define NX_HTTP_STATUS_METHOD_NOT_ALLOWED "405 Method Not Allowed" 281 #define NX_HTTP_STATUS_NOT_ACCEPTABLE "406 Not Acceptable" 282 #define NX_HTTP_STATUS_PROXY_AUTH_REQUIRED "407 Proxy Authentication Required" 283 #define NX_HTTP_STATUS_REQUEST_TIMEOUT "408 Request Time-out" 284 #define NX_HTTP_STATUS_CONFLICT "409 Conflict" 285 #define NX_HTTP_STATUS_GONE "410 Gone" 286 #define NX_HTTP_STATUS_LENGTH_REQUIRED "411 Length Required" 287 #define NX_HTTP_STATUS_PRECONDITION_FAILED "412 Precondition Failed" 288 #define NX_HTTP_STATUS_ENTITY_TOO_LARGE "413 Request Entity Too Large" 289 #define NX_HTTP_STATUS_URL_TOO_LARGE "414 Request-URL Too Large" 290 #define NX_HTTP_STATUS_UNSUPPORTED_MEDIA "415 Unsupported Media Type" 291 #define NX_HTTP_STATUS_RANGE_NOT_SATISFY "416 Requested range not satisfiable" 292 #define NX_HTTP_STATUS_EXPECTATION_FAILED "417 Expectation Failed" 293 #define NX_HTTP_STATUS_INTERNAL_ERROR "500 Internal Server Error" 294 #define NX_HTTP_STATUS_NOT_IMPLEMENTED "501 Not Implemented" 295 #define NX_HTTP_STATUS_BAD_GATEWAY "502 Bad Gateway" 296 #define NX_HTTP_STATUS_SERVICE_UNAVAILABLE "503 Service Unavailable" 297 #define NX_HTTP_STATUS_GATEWAY_TIMEOUT "504 Gateway Time-out" 298 #define NX_HTTP_STATUS_VERSION_ERROR "505 HTTP Version not supported" 299 300 301 /* Define the max length of header field. */ 302 303 #ifndef NX_HTTP_MAX_HEADER_FIELD 304 #define NX_HTTP_MAX_HEADER_FIELD 256 305 #endif 306 307 308 /* Define default MIME type. */ 309 /* Page 14, Section 5.2, RFC 2045 */ 310 #define NX_HTTP_SERVER_DEFAULT_MIME "text/plain" 311 312 313 /* Define the MIME map structure. */ 314 315 typedef struct NX_HTTP_SERVER_MIME_MAP_STRUCT 316 { 317 CHAR *nx_http_server_mime_map_extension; /* Extension of file */ 318 CHAR *nx_http_server_mime_map_type; /* MIME type of file */ 319 } NX_HTTP_SERVER_MIME_MAP; 320 321 322 /* Define the date structure. */ 323 324 typedef struct NX_HTTP_SERVER_DATE_STRUCT 325 { 326 USHORT nx_http_server_year; /* Year */ 327 UCHAR nx_http_server_month; /* Month */ 328 UCHAR nx_http_server_day; /* Day */ 329 UCHAR nx_http_server_hour; /* Hour */ 330 UCHAR nx_http_server_minute; /* Minute */ 331 UCHAR nx_http_server_second; /* Second */ 332 UCHAR nx_http_server_weekday; /* Weekday */ 333 } NX_HTTP_SERVER_DATE; 334 335 336 /* Define the nonce structure. */ 337 338 typedef struct NX_HTTP_SERVER_NONCE_STRUCT 339 { 340 UINT nonce_state; /* The state of the nonce */ 341 UINT nonce_timestamp; /* The time when the nonce is created */ 342 UCHAR nonce_buffer[NX_HTTP_SERVER_NONCE_SIZE]; /* Nonce for digest authetication */ 343 } NX_HTTP_SERVER_NONCE; 344 345 346 /* Define the multipart context data structure. */ 347 348 typedef struct NX_HTTP_SERVER_MULTIPART_STRUCT 349 { 350 351 /* Boundary string. */ 352 UCHAR nx_http_server_multipart_boundary[NX_HTTP_MAX_HEADER_FIELD + 1]; 353 354 /* Offset of available data. */ 355 UINT nx_http_server_multipart_available_offset; 356 357 /* Length of available data. */ 358 UINT nx_http_server_multipart_available_length; 359 360 /* Boundary find status. */ 361 volatile UINT nx_http_server_multipart_boundary_find; 362 363 /* The next packet to process. */ 364 NX_PACKET *nx_http_server_multipart_next_packet; 365 366 /* Offset of next available data. */ 367 UINT nx_http_server_multipart_next_available_offset; 368 369 /* The packet returned at last. */ 370 NX_PACKET *nx_http_server_multipart_last_packet; 371 372 } NX_HTTP_SERVER_MULTIPART; 373 374 375 /* Define the HTTP Server data structure. */ 376 377 typedef struct NX_HTTP_SERVER_STRUCT 378 { 379 ULONG nx_http_server_id; /* HTTP Server ID */ 380 CHAR *nx_http_server_name; /* Name of this HTTP Server */ 381 NX_IP *nx_http_server_ip_ptr; /* Pointer to associated IP structure */ 382 CHAR nx_http_server_request_resource[NX_HTTP_MAX_RESOURCE + 1]; 383 /* Uniform Resource Locator (URL) */ 384 UINT nx_http_connection_pending; /* Connection pending flag */ 385 NX_PACKET_POOL *nx_http_server_packet_pool_ptr; /* Pointer to HTTP Server packet pool */ 386 FX_MEDIA *nx_http_server_media_ptr; /* Pointer to media control block */ 387 ULONG nx_http_server_get_requests; /* Number of get requests */ 388 ULONG nx_http_server_head_requests; /* Number of head requests */ 389 ULONG nx_http_server_put_requests; /* Number of put requests */ 390 ULONG nx_http_server_delete_requests; /* Number of delete requests */ 391 ULONG nx_http_server_post_requests; /* Number of post requests */ 392 ULONG nx_http_server_unknown_requests; /* Number of unknown requests */ 393 ULONG nx_http_server_total_bytes_sent; /* Number of total bytes sent */ 394 ULONG nx_http_server_total_bytes_received; /* Number of total bytes received */ 395 ULONG nx_http_server_allocation_errors; /* Number of allocation errors */ 396 ULONG nx_http_server_connection_failures; /* Number of failed connections */ 397 ULONG nx_http_server_connection_successes; /* Number of successful connections */ 398 ULONG nx_http_server_invalid_http_headers; /* Number of invalid http headers */ 399 FX_FILE nx_http_server_file; /* HTTP file control block */ 400 NX_TCP_SOCKET nx_http_server_socket; /* HTTP Server TCP socket */ 401 TX_THREAD nx_http_server_thread; /* HTTP server thread */ 402 #ifdef NX_HTTP_DIGEST_ENABLE 403 NX_MD5 nx_http_server_md5data; /* HTTP server MD5 work area */ 404 NX_HTTP_SERVER_NONCE 405 nx_http_server_nonces[NX_HTTP_SERVER_NONCE_MAX];/* Nonce for digest authetication */ 406 #endif /* NX_HTTP_DIGEST_ENABLE */ 407 408 #ifdef NX_HTTP_MULTIPART_ENABLE 409 NX_HTTP_SERVER_MULTIPART 410 nx_http_server_multipart; /* HTTP multipart area */ 411 #endif /* NX_HTTP_MULTIPART_ENABLE */ 412 413 UINT nx_http_server_request_type; /* HTTP request type */ 414 NX_HTTP_SERVER_MIME_MAP 415 *nx_http_server_mime_maps_additional; /* Additional HTTP MIME maps */ 416 UINT nx_http_server_mime_maps_additional_num; /* Number of additional HTTP MIME maps */ 417 /* Define the user supplied routines that are used to inform the application of particular server requests. */ 418 419 UINT (*nx_http_server_authentication_check)(struct NX_HTTP_SERVER_STRUCT *server_ptr, UINT request_type, CHAR *resource, CHAR **name, CHAR **password, CHAR **realm); 420 UINT (*nx_http_server_authentication_check_extended)(struct NX_HTTP_SERVER_STRUCT *server_ptr, UINT request_type, CHAR *resource, CHAR **name, UINT *name_length, CHAR **password, UINT *password_length, CHAR **realm, UINT *realm_length); 421 UINT (*nx_http_server_request_notify)(struct NX_HTTP_SERVER_STRUCT *server_ptr, UINT request_type, CHAR *resource, NX_PACKET *packet_ptr); 422 UINT (*nx_http_server_invalid_username_password_callback)(CHAR *resource, NXD_ADDRESS *client_nxd_address, UINT request_type); 423 VOID (*nx_http_server_gmt_get)(NX_HTTP_SERVER_DATE *date); 424 UINT (*nx_http_server_cache_info_get)(CHAR *resource, UINT *max_age, NX_HTTP_SERVER_DATE *last_modified); 425 #ifdef NX_HTTP_DIGEST_ENABLE 426 UINT (*nx_http_server_digest_authenticate_callback)(struct NX_HTTP_SERVER_STRUCT *server_ptr, CHAR *name_ptr, 427 CHAR *realm_ptr, CHAR *password_ptr, CHAR *method, 428 CHAR *authorization_uri, CHAR *authorization_nc, 429 CHAR *authorization_cnonce); 430 #endif 431 } NX_HTTP_SERVER; 432 433 434 #ifndef NX_HTTP_SOURCE_CODE 435 436 /* Application caller is present, perform API mapping. */ 437 438 /* Determine if error checking is desired. If so, map API functions 439 to the appropriate error checking front-ends. Otherwise, map API 440 functions to the core functions that actually perform the work. 441 Note: error checking is enabled by default. */ 442 443 #ifdef NX_DISABLE_ERROR_CHECKING 444 445 /* Services without error checking. */ 446 447 #define nx_http_server_callback_data_send _nx_http_server_callback_data_send 448 #define nx_http_server_callback_response_send _nx_http_server_callback_response_send 449 #define nx_http_server_callback_response_send_extended _nx_http_server_callback_response_send_extended 450 #define nx_http_server_content_get _nx_http_server_content_get 451 #define nx_http_server_content_length_get _nx_http_server_content_length_get 452 #define nx_http_server_create _nx_http_server_create 453 #define nx_http_server_delete _nx_http_server_delete 454 #define nx_http_server_param_get _nx_http_server_param_get 455 #define nx_http_server_query_get _nx_http_server_query_get 456 #define nx_http_server_start _nx_http_server_start 457 #define nx_http_server_stop _nx_http_server_stop 458 #define nx_http_server_content_get_extended _nx_http_server_content_get_extended 459 #define nx_http_server_content_length_get_extended _nx_http_server_content_length_get_extended 460 #define nx_http_server_get_entity_header _nx_http_server_get_entity_header 461 #define nx_http_server_get_entity_content _nx_http_server_get_entity_content 462 #define nx_http_server_callback_generate_response_header _nx_http_server_callback_generate_response_header 463 #define nx_http_server_callback_generate_response_header_extended _nx_http_server_callback_generate_response_header_extended 464 #define nx_http_server_callback_packet_send _nx_http_server_callback_packet_send 465 #define nx_http_server_gmt_callback_set _nx_http_server_gmt_callback_set 466 #define nx_http_server_cache_info_callback_set _nx_http_server_cache_info_callback_set 467 #define nx_http_server_mime_maps_additional_set _nx_http_server_mime_maps_additional_set 468 #define nx_http_server_type_get _nx_http_server_type_get 469 #define nx_http_server_type_get_extended _nx_http_server_type_get_extended 470 #define nx_http_server_packet_content_find _nx_http_server_packet_content_find 471 #define nx_http_server_packet_get _nx_http_server_packet_get 472 #define nx_http_server_invalid_userpassword_notify_set _nx_http_server_invalid_userpassword_notify_set 473 #define nx_http_server_digest_authenticate_notify_set _nx_http_server_digest_authenticate_notify_set 474 #define nx_http_server_authentication_check_set _nx_http_server_authentication_check_set 475 476 #else 477 478 /* Services with error checking. */ 479 480 #define nx_http_server_callback_data_send _nxe_http_server_callback_data_send 481 #define nx_http_server_callback_response_send _nxe_http_server_callback_response_send 482 #define nx_http_server_callback_response_send_extended _nxe_http_server_callback_response_send_extended 483 #define nx_http_server_content_get _nxe_http_server_content_get 484 #define nx_http_server_content_length_get _nxe_http_server_content_length_get 485 #define nx_http_server_create(p,n,i,m,sp,ss,pp,a,r) _nxe_http_server_create(p,n,i,m,sp,ss,pp,a,r,sizeof(NX_HTTP_SERVER)) 486 #define nx_http_server_delete _nxe_http_server_delete 487 #define nx_http_server_param_get _nxe_http_server_param_get 488 #define nx_http_server_query_get _nxe_http_server_query_get 489 #define nx_http_server_start _nxe_http_server_start 490 #define nx_http_server_stop _nxe_http_server_stop 491 #define nx_http_server_content_get_extended _nxe_http_server_content_get_extended 492 #define nx_http_server_content_length_get_extended _nxe_http_server_content_length_get_extended 493 #define nx_http_server_get_entity_header _nxe_http_server_get_entity_header 494 #define nx_http_server_get_entity_content _nxe_http_server_get_entity_content 495 #define nx_http_server_callback_generate_response_header _nxe_http_server_callback_generate_response_header 496 #define nx_http_server_callback_generate_response_header_extended _nxe_http_server_callback_generate_response_header_extended 497 #define nx_http_server_callback_packet_send _nxe_http_server_callback_packet_send 498 #define nx_http_server_gmt_callback_set _nxe_http_server_gmt_callback_set 499 #define nx_http_server_cache_info_callback_set _nxe_http_server_cache_info_callback_set 500 #define nx_http_server_mime_maps_additional_set _nxe_http_server_mime_maps_additional_set 501 #define nx_http_server_type_get _nxe_http_server_type_get 502 #define nx_http_server_type_get_extended _nxe_http_server_type_get_extended 503 #define nx_http_server_packet_content_find _nxe_http_server_packet_content_find 504 #define nx_http_server_packet_get _nxe_http_server_packet_get 505 #define nx_http_server_invalid_userpassword_notify_set _nxe_http_server_invalid_userpassword_notify_set 506 #define nx_http_server_digest_authenticate_notify_set _nxe_http_server_digest_authenticate_notify_set 507 #define nx_http_server_authentication_check_set _nxe_http_server_authentication_check_set 508 509 #endif 510 511 /* Define the prototypes accessible to the application software. */ 512 513 514 UINT nx_http_server_callback_data_send(NX_HTTP_SERVER *server_ptr, VOID *data_ptr, ULONG data_length); 515 UINT nx_http_server_callback_response_send(NX_HTTP_SERVER *server_ptr, CHAR *status_code, CHAR *information, CHAR *additional_info); 516 UINT nx_http_server_callback_response_send_extended(NX_HTTP_SERVER *server_ptr, CHAR *status_code, UINT status_code_length, CHAR *information, UINT information_length, CHAR *additional_info, UINT additional_info_length); 517 UINT nx_http_server_content_get(NX_HTTP_SERVER *server_ptr, NX_PACKET *packet_ptr, ULONG byte_offset, CHAR *destination_ptr, UINT destination_size, UINT *actual_size); 518 UINT nx_http_server_packet_get(NX_HTTP_SERVER *server_ptr, NX_PACKET **packet_ptr); 519 UINT nx_http_server_packet_content_find(NX_HTTP_SERVER *server_ptr, NX_PACKET **packet_ptr, ULONG *content_length); 520 UINT nx_http_server_content_length_get(NX_PACKET *packet_ptr); 521 #ifdef NX_DISABLE_ERROR_CHECKING 522 UINT _nx_http_server_create(NX_HTTP_SERVER *http_server_ptr, CHAR *http_server_name, NX_IP *ip_ptr, FX_MEDIA *media_ptr, VOID *stack_ptr, ULONG stack_size, NX_PACKET_POOL *pool_ptr, 523 UINT (*authentication_check)(NX_HTTP_SERVER *server_ptr, UINT request_type, CHAR *resource, CHAR **name, CHAR **password, CHAR **realm), 524 UINT (*request_notify)(NX_HTTP_SERVER *server_ptr, UINT request_type, CHAR *resource, NX_PACKET *packet_ptr)); 525 #else 526 UINT _nxe_http_server_create(NX_HTTP_SERVER *http_server_ptr, CHAR *http_server_name, NX_IP *ip_ptr, FX_MEDIA *media_ptr, VOID *stack_ptr, ULONG stack_size, NX_PACKET_POOL *pool_ptr, 527 UINT (*authentication_check)(NX_HTTP_SERVER *server_ptr, UINT request_type, CHAR *resource, CHAR **name, CHAR **password, CHAR **realm), 528 UINT (*request_notify)(NX_HTTP_SERVER *server_ptr, UINT request_type, CHAR *resource, NX_PACKET *packet_ptr), 529 UINT http_server_size); 530 #endif /* NX_DISABLE_ERROR_CHECKING */ 531 UINT nx_http_server_delete(NX_HTTP_SERVER *http_server_ptr); 532 UINT nx_http_server_param_get(NX_PACKET *packet_ptr, UINT param_number, CHAR *param_ptr, UINT max_param_size); 533 UINT nx_http_server_query_get(NX_PACKET *packet_ptr, UINT query_number, CHAR *query_ptr, UINT max_query_size); 534 UINT nx_http_server_start(NX_HTTP_SERVER *http_server_ptr); 535 UINT nx_http_server_stop(NX_HTTP_SERVER *http_server_ptr); 536 UINT nx_http_server_content_get_extended(NX_HTTP_SERVER *server_ptr, NX_PACKET *packet_ptr, ULONG byte_offset, CHAR *destination_ptr, UINT destination_size, UINT *actual_size); 537 UINT nx_http_server_content_length_get_extended(NX_PACKET *packet_ptr, ULONG *length); 538 UINT nx_http_server_get_entity_header(NX_HTTP_SERVER *server_ptr, NX_PACKET **packet_pptr, UCHAR *entity_header_buffer, ULONG buffer_size); 539 UINT nx_http_server_get_entity_content(NX_HTTP_SERVER *server_ptr, NX_PACKET **packet_pptr, ULONG *available_offset, ULONG *available_length); 540 UINT nx_http_server_callback_generate_response_header(NX_HTTP_SERVER *server_ptr, NX_PACKET **packet_pptr, 541 CHAR *status_code, UINT content_length, CHAR *content_type, 542 CHAR* additional_header); 543 UINT nx_http_server_callback_generate_response_header_extended(NX_HTTP_SERVER *server_ptr, NX_PACKET **packet_pptr, CHAR *status_code, 544 UINT status_code_length, UINT content_length, CHAR *content_type, 545 UINT content_type_length, CHAR* additional_header, UINT additional_header_length); 546 UINT nx_http_server_callback_packet_send(NX_HTTP_SERVER *server_ptr, NX_PACKET *packet_ptr); 547 UINT nx_http_server_gmt_callback_set(NX_HTTP_SERVER *server_ptr, VOID (*gmt_get)(NX_HTTP_SERVER_DATE *)); 548 UINT nx_http_server_cache_info_callback_set(NX_HTTP_SERVER *server_ptr, UINT (*cache_info_get)(CHAR *, UINT *, NX_HTTP_SERVER_DATE *)); 549 UINT nx_http_server_mime_maps_additional_set(NX_HTTP_SERVER *server_ptr, NX_HTTP_SERVER_MIME_MAP *mime_maps, UINT mime_maps_num); 550 UINT nx_http_server_type_get(NX_HTTP_SERVER *server_ptr, CHAR *name, CHAR *http_type_string); 551 UINT nx_http_server_type_get_extended(NX_HTTP_SERVER *server_ptr, CHAR *name, UINT name_length, CHAR *http_type_string, UINT http_type_string_max_size); 552 UINT nx_http_server_invalid_userpassword_notify_set(NX_HTTP_SERVER *http_server_ptr, UINT (*invalid_username_password_callback)(CHAR *resource, NXD_ADDRESS *client_nxd_address, UINT request_type )); 553 UINT nx_http_server_digest_authenticate_notify_set(NX_HTTP_SERVER *http_server_ptr, 554 UINT (*digest_authenticate_callback)(NX_HTTP_SERVER *server_ptr, CHAR *name_ptr, 555 CHAR *realm_ptr, CHAR *password_ptr, CHAR *method, 556 CHAR *authorization_uri, CHAR *authorization_nc, 557 CHAR *authorization_cnonce)); 558 UINT nx_http_server_authentication_check_set(NX_HTTP_SERVER *http_server_ptr, 559 UINT (*authentication_check_extended)(NX_HTTP_SERVER *server_ptr, UINT request_type, CHAR *resource, CHAR **name, UINT *name_length, CHAR **password, UINT *password_length, CHAR **realm, UINT *realm_length)); 560 561 #else 562 563 /* HTTP source code is being compiled, do not perform any API mapping. */ 564 565 UINT _nx_http_server_callback_data_send(NX_HTTP_SERVER *server_ptr, VOID *data_ptr, ULONG data_length); 566 UINT _nx_http_server_callback_response_send(NX_HTTP_SERVER *server_ptr, CHAR *status_code, CHAR *information, CHAR *additional_info); 567 UINT _nx_http_server_callback_response_send_extended(NX_HTTP_SERVER *server_ptr, CHAR *status_code, UINT status_code_length, CHAR *information, UINT infomation_length, CHAR *additional_info, UINT additional_info_length); 568 UINT _nx_http_server_content_get(NX_HTTP_SERVER *server_ptr, NX_PACKET *packet_ptr, ULONG byte_offset, CHAR *destination_ptr, UINT destination_size, UINT *actual_size); 569 UINT _nx_http_server_content_length_get(NX_PACKET *packet_ptr); 570 UINT _nx_http_server_create(NX_HTTP_SERVER *http_server_ptr, CHAR *http_server_name, NX_IP *ip_ptr, FX_MEDIA *media_ptr, VOID *stack_ptr, ULONG stack_size, NX_PACKET_POOL *pool_ptr, 571 UINT (*authentication_check)(NX_HTTP_SERVER *server_ptr, UINT request_type, CHAR *resource, CHAR **name, CHAR **password, CHAR **realm), 572 UINT (*request_notify)(NX_HTTP_SERVER *server_ptr, UINT request_type, CHAR *resource, NX_PACKET *packet_ptr)); 573 UINT _nx_http_server_delete(NX_HTTP_SERVER *http_server_ptr); 574 UINT _nx_http_server_param_get(NX_PACKET *packet_ptr, UINT param_number, CHAR *param_ptr, UINT max_param_size); 575 UINT _nx_http_server_query_get(NX_PACKET *packet_ptr, UINT query_number, CHAR *query_ptr, UINT max_query_size); 576 UINT _nx_http_server_start(NX_HTTP_SERVER *http_server_ptr); 577 UINT _nx_http_server_stop(NX_HTTP_SERVER *http_server_ptr); 578 UINT _nx_http_server_content_get_extended(NX_HTTP_SERVER *server_ptr, NX_PACKET *packet_ptr, ULONG byte_offset, CHAR *destination_ptr, UINT destination_size, UINT *actual_size); 579 UINT _nx_http_server_content_length_get_extended(NX_PACKET *packet_ptr, ULONG *length); 580 UINT _nx_http_server_get_entity_header(NX_HTTP_SERVER *server_ptr, NX_PACKET **packet_pptr, UCHAR *entity_header_buffer, ULONG buffer_size); 581 UINT _nx_http_server_get_entity_content(NX_HTTP_SERVER *server_ptr, NX_PACKET **packet_pptr, ULONG *available_offset, ULONG *available_length); 582 UINT _nx_http_server_callback_generate_response_header(NX_HTTP_SERVER *server_ptr, NX_PACKET **packet_pptr, 583 CHAR *status_code, UINT content_length, CHAR *content_type, 584 CHAR* additional_header); 585 UINT _nx_http_server_callback_generate_response_header_extended(NX_HTTP_SERVER *server_ptr, NX_PACKET **packet_pptr, CHAR *status_code, 586 UINT status_code_length, UINT content_length, CHAR *content_type, 587 UINT content_type_length, CHAR* additional_header, UINT additional_header_length); 588 UINT _nx_http_server_callback_packet_send(NX_HTTP_SERVER *server_ptr, NX_PACKET *packet_ptr); 589 UINT _nx_http_server_gmt_callback_set(NX_HTTP_SERVER *server_ptr, VOID (*gmt_callback)(NX_HTTP_SERVER_DATE *)); 590 UINT _nx_http_server_cache_info_callback_set(NX_HTTP_SERVER *server_ptr, UINT (*cache_info_get)(CHAR *, UINT *, NX_HTTP_SERVER_DATE *)); 591 UINT _nx_http_server_mime_maps_additional_set(NX_HTTP_SERVER *server_ptr, NX_HTTP_SERVER_MIME_MAP *mime_maps, UINT mime_maps_num); 592 UINT _nx_http_server_packet_content_find(NX_HTTP_SERVER *server_ptr, NX_PACKET **packet_ptr, ULONG *content_length); 593 UINT _nx_http_server_packet_get(NX_HTTP_SERVER *server_ptr, NX_PACKET **packet_ptr); 594 UINT _nx_http_server_invalid_userpassword_notify_set(NX_HTTP_SERVER *http_server_ptr, UINT (*invalid_username_password_callback)(CHAR *resource, NXD_ADDRESS *client_nxd_address, UINT request_type )); 595 UINT _nx_http_server_digest_authenticate_notify_set(NX_HTTP_SERVER *http_server_ptr, 596 UINT (*digest_authenticate_callback)(NX_HTTP_SERVER *server_ptr, CHAR *name_ptr, 597 CHAR *realm_ptr, CHAR *password_ptr, CHAR *method, 598 CHAR *authorization_uri, CHAR *authorization_nc, 599 CHAR *authorization_cnonce)); 600 UINT _nx_http_server_authentication_check_set(NX_HTTP_SERVER *http_server_ptr, 601 UINT (*authentication_check_extended)(NX_HTTP_SERVER *server_ptr, UINT request_type, CHAR *resource, CHAR **name, UINT *name_length, CHAR **password, UINT *password_length, CHAR **realm, UINT *realm_length)); 602 603 604 605 /* Define internal HTTP Server functions. */ 606 607 VOID _nx_http_server_connection_present(NX_TCP_SOCKET *socket_ptr, UINT port); 608 VOID _nx_http_server_thread_entry(ULONG http_server_address); 609 UINT _nx_http_server_get_client_request(NX_HTTP_SERVER *server_ptr, NX_PACKET **packet_ptr); 610 VOID _nx_http_server_get_process(NX_HTTP_SERVER *server_ptr, UINT request_type, NX_PACKET *packet_ptr); 611 VOID _nx_http_server_put_process(NX_HTTP_SERVER *server_ptr, NX_PACKET *packet_ptr); 612 VOID _nx_http_server_delete_process(NX_HTTP_SERVER *server_ptr, NX_PACKET *packet_ptr); 613 UINT _nx_http_server_response_send(NX_HTTP_SERVER *server_ptr, CHAR *status_code, UINT status_code_length, CHAR *information, UINT information_length, CHAR *additional_info, UINT additional_info_length); 614 UINT _nx_http_server_basic_authenticate(NX_HTTP_SERVER *server_ptr, NX_PACKET *packet_ptr, CHAR *name_ptr, CHAR *password_ptr, CHAR *realm_ptr, UINT realm_length, UINT *auth_request_present); 615 UINT _nx_http_server_retrieve_basic_authorization(NX_PACKET *packet_ptr, CHAR *authorization_request_ptr); 616 UINT _nx_http_server_retrieve_resource(NX_PACKET *packet_ptr, CHAR *destination, UINT max_size); 617 UINT _nx_http_server_calculate_content_offset(NX_PACKET *packet_ptr); 618 UINT _nx_http_server_type_get(NX_HTTP_SERVER *server_ptr, CHAR *name, CHAR *http_type_string); 619 UINT _nx_http_server_type_get_extended(NX_HTTP_SERVER *server_ptr, CHAR *name, UINT name_length, CHAR *http_type_string, UINT http_type_string_max_size); 620 UINT _nx_http_server_disconnect(NX_HTTP_SERVER *http_server_ptr, UINT wait_option); 621 622 #ifdef NX_HTTP_DIGEST_ENABLE 623 UINT _nx_http_server_digest_authenticate(NX_HTTP_SERVER *server_ptr, NX_PACKET *packet_ptr, CHAR *name_ptr, UINT name_length, CHAR *password_ptr, UINT password_length, CHAR *realm_ptr, UINT realm_length, UINT *auth_request_present); 624 VOID _nx_http_server_digest_response_calculate(NX_HTTP_SERVER *server_ptr, CHAR *username, UINT username_length, CHAR *realm, UINT realm_length, CHAR *password, UINT password_length, CHAR *nonce, CHAR *method, CHAR *uri, CHAR *nc, CHAR *cnonce, CHAR *result); 625 UINT _nx_http_server_retrieve_digest_authorization(NX_HTTP_SERVER *server_ptr, NX_PACKET *packet_ptr, CHAR *response, CHAR *uri, CHAR *nc, CHAR *cnonce, NX_HTTP_SERVER_NONCE **nonce_ptr); 626 VOID _nx_http_server_hex_ascii_convert(CHAR *source, UINT source_length, CHAR *destination); 627 UINT _nx_http_server_nonce_allocate(NX_HTTP_SERVER *server_ptr, NX_HTTP_SERVER_NONCE **nonce_ptr); 628 #endif 629 630 #ifdef NX_HTTP_MULTIPART_ENABLE 631 UINT _nx_http_server_boundary_find(NX_HTTP_SERVER *server_ptr, NX_PACKET **packet_pptr); 632 #endif /* NX_HTTP_MULTIPART_ENABLE */ 633 634 UINT _nx_http_server_match_string(UCHAR *src_start, UCHAR *src_end, UCHAR *target, ULONG target_length, ULONG *match_count, UCHAR **match_end_ptr); 635 UINT _nx_http_server_field_value_get(NX_PACKET *packet_ptr, UCHAR *field_name, ULONG name_length, UCHAR *field_value, ULONG field_value_size); 636 UINT _nx_http_server_memicmp(UCHAR *src, ULONG src_length, UCHAR *dest, ULONG dest_length); 637 638 UINT _nx_http_server_generate_response_header(NX_HTTP_SERVER *server_ptr, NX_PACKET **packet_pptr, CHAR *status_code, 639 UINT status_code_length, UINT content_length, CHAR *content_type, 640 UINT content_type_length, CHAR* additional_header, UINT additional_header_length); 641 UINT _nx_http_server_date_to_string(NX_HTTP_SERVER_DATE *date, CHAR *string); 642 VOID _nx_http_server_date_convert(UINT date, UINT count, CHAR *string); 643 644 UINT _nxe_http_server_callback_data_send(NX_HTTP_SERVER *server_ptr, VOID *data_ptr, ULONG data_length); 645 UINT _nxe_http_server_callback_response_send(NX_HTTP_SERVER *server_ptr, CHAR *status_code, CHAR *information, CHAR *additional_info); 646 UINT _nxe_http_server_callback_response_send_extended(NX_HTTP_SERVER *server_ptr, CHAR *status_code, UINT status_code_length, CHAR *information, UINT infomation_length, CHAR *additional_info, UINT additional_info_length); 647 UINT _nxe_http_server_content_get(NX_HTTP_SERVER *server_ptr, NX_PACKET *packet_ptr, ULONG byte_offset, CHAR *destination_ptr, UINT destination_size, UINT *actual_size); 648 UINT _nxe_http_server_packet_content_find(NX_HTTP_SERVER *server_ptr, NX_PACKET **packet_ptr, ULONG *content_length); 649 UINT _nxe_http_server_packet_get(NX_HTTP_SERVER *server_ptr, NX_PACKET **packet_ptr); 650 UINT _nxe_http_server_content_length_get(NX_PACKET *packet_ptr); 651 UINT _nxe_http_server_content_get_extended(NX_HTTP_SERVER *server_ptr, NX_PACKET *packet_ptr, ULONG byte_offset, 652 CHAR *destination_ptr, UINT destination_size, UINT *actual_size); 653 UINT _nxe_http_server_content_length_get_extended(NX_PACKET *packet_ptr, ULONG *content_length); 654 UINT _nxe_http_server_create(NX_HTTP_SERVER *http_server_ptr, CHAR *http_server_name, NX_IP *ip_ptr, FX_MEDIA *media_ptr, VOID *stack_ptr, ULONG stack_size, NX_PACKET_POOL *pool_ptr, 655 UINT (*authentication_check)(NX_HTTP_SERVER *server_ptr, UINT request_type, CHAR *resource, CHAR **name, CHAR **password, CHAR **realm), 656 UINT (*request_notify)(NX_HTTP_SERVER *server_ptr, UINT request_type, CHAR *resource, NX_PACKET *packet_ptr), 657 UINT http_server_size); 658 UINT _nxe_http_server_delete(NX_HTTP_SERVER *http_server_ptr); 659 UINT _nxe_http_server_param_get(NX_PACKET *packet_ptr, UINT param_number, CHAR *param_ptr, UINT max_param_size); 660 UINT _nxe_http_server_query_get(NX_PACKET *packet_ptr, UINT query_number, CHAR *query_ptr, UINT max_query_size); 661 UINT _nxe_http_server_start(NX_HTTP_SERVER *http_server_ptr); 662 UINT _nxe_http_server_stop(NX_HTTP_SERVER *http_server_ptr); 663 UINT _nxe_http_server_invalid_userpassword_notify_set(NX_HTTP_SERVER *http_server_ptr, 664 UINT (*invalid_username_password_callback)(CHAR *resource, NXD_ADDRESS *client_nxd_address, UINT request_type)); 665 UINT _nxe_http_server_type_get(NX_HTTP_SERVER *server_ptr, CHAR *name, CHAR *http_type_string); 666 UINT _nxe_http_server_type_get_extended(NX_HTTP_SERVER *server_ptr, CHAR *name, UINT name_length, CHAR *http_type_string, UINT http_type_string_max_size); 667 UINT _nxe_http_server_get_entity_header(NX_HTTP_SERVER *server_ptr, NX_PACKET **packet_pptr, UCHAR *entity_header_buffer, ULONG buffer_size); 668 UINT _nxe_http_server_get_entity_content(NX_HTTP_SERVER *server_ptr, NX_PACKET **packet_pptr, ULONG *available_offset, ULONG *available_length); 669 UINT _nxe_http_server_callback_generate_response_header(NX_HTTP_SERVER *server_ptr, NX_PACKET **packet_pptr, 670 CHAR *status_code, UINT content_length, CHAR *content_type, 671 CHAR* additional_header); 672 UINT _nxe_http_server_callback_generate_response_header_extended(NX_HTTP_SERVER *server_ptr, NX_PACKET **packet_pptr, CHAR *status_code, 673 UINT status_code_length, UINT content_length, CHAR *content_type, 674 UINT content_type_length, CHAR* additional_header, UINT additional_header_length); 675 UINT _nxe_http_server_callback_packet_send(NX_HTTP_SERVER *server_ptr, NX_PACKET *packet_ptr); 676 UINT _nxe_http_server_gmt_callback_set(NX_HTTP_SERVER *server_ptr, VOID (*gmt_get)(NX_HTTP_SERVER_DATE *)); 677 UINT _nxe_http_server_cache_info_callback_set(NX_HTTP_SERVER *server_ptr, UINT (*cache_info_get)(CHAR *, UINT *, NX_HTTP_SERVER_DATE *)); 678 UINT _nxe_http_server_mime_maps_additional_set(NX_HTTP_SERVER *server_ptr, NX_HTTP_SERVER_MIME_MAP *mime_maps, UINT mime_maps_num); 679 UINT _nxe_http_server_digest_authenticate_notify_set(NX_HTTP_SERVER *http_server_ptr, 680 UINT (*digest_authenticate_callback)(NX_HTTP_SERVER *server_ptr, CHAR *name_ptr, 681 CHAR *realm_ptr, CHAR *password_ptr, CHAR *method, 682 CHAR *authorization_uri, CHAR *authorization_nc, 683 CHAR *authorization_cnonce)); 684 UINT _nxe_http_server_authentication_check_set(NX_HTTP_SERVER *http_server_ptr, 685 UINT (*authentication_check_extended)(NX_HTTP_SERVER *server_ptr, UINT request_type, CHAR *resource, CHAR **name, UINT *name_length, CHAR **password, UINT *password_length, CHAR **realm, UINT *realm_length)); 686 687 #endif /* NX_HTTP_SOURCE_CODE */ 688 689 /* Determine if a C++ compiler is being used. If so, complete the standard 690 C conditional started above. */ 691 #ifdef __cplusplus 692 } 693 #endif 694 695 #endif /* NXD_HTTP_SERVER_H */ 696