003 File Manager
Current Path:
/usr/src/contrib/wpa/src/wps
usr
/
src
/
contrib
/
wpa
/
src
/
wps
/
📁
..
📄
http.h
(690 B)
📄
http_client.c
(8.01 KB)
📄
http_client.h
(1.17 KB)
📄
http_server.c
(6.36 KB)
📄
http_server.h
(1.14 KB)
📄
httpread.c
(22.74 KB)
📄
httpread.h
(4.04 KB)
📄
ndef.c
(4.83 KB)
📄
upnp_xml.c
(7.83 KB)
📄
upnp_xml.h
(797 B)
📄
wps.c
(17.54 KB)
📄
wps.h
(28.58 KB)
📄
wps_attr_build.c
(13.55 KB)
📄
wps_attr_parse.c
(15.66 KB)
📄
wps_attr_parse.h
(3.49 KB)
📄
wps_attr_process.c
(7.2 KB)
📄
wps_common.c
(20.99 KB)
📄
wps_defs.h
(10 KB)
📄
wps_dev_attr.c
(10.44 KB)
📄
wps_dev_attr.h
(1.81 KB)
📄
wps_enrollee.c
(40.81 KB)
📄
wps_er.c
(50.46 KB)
📄
wps_er.h
(2.52 KB)
📄
wps_er_ssdp.c
(4.9 KB)
📄
wps_i.h
(6.99 KB)
📄
wps_module_tests.c
(11.77 KB)
📄
wps_registrar.c
(101.36 KB)
📄
wps_upnp.c
(37.51 KB)
📄
wps_upnp.h
(1.33 KB)
📄
wps_upnp_ap.c
(2.36 KB)
📄
wps_upnp_event.c
(11.49 KB)
📄
wps_upnp_i.h
(6.67 KB)
📄
wps_upnp_ssdp.c
(25.47 KB)
📄
wps_upnp_web.c
(37.39 KB)
📄
wps_validate.c
(46.87 KB)
Editing: httpread.h
/* * httpread - Manage reading file(s) from HTTP/TCP socket * Author: Ted Merrill * Copyright 2008 Atheros Communications * * This software may be distributed under the terms of the BSD license. * See README for more details. */ #ifndef HTTPREAD_H #define HTTPREAD_H /* event types (passed to callback) */ enum httpread_event { HTTPREAD_EVENT_FILE_READY = 1, /* including reply ready */ HTTPREAD_EVENT_TIMEOUT = 2, HTTPREAD_EVENT_ERROR = 3 /* misc. error, esp malloc error */ }; /* header type detected * available to callback via call to httpread_reply_code_get() */ enum httpread_hdr_type { HTTPREAD_HDR_TYPE_UNKNOWN = 0, /* none of the following */ HTTPREAD_HDR_TYPE_REPLY = 1, /* hdr begins w/ HTTP/ */ HTTPREAD_HDR_TYPE_GET = 2, /* hdr begins with GET<sp> */ HTTPREAD_HDR_TYPE_HEAD = 3, /* hdr begins with HEAD<sp> */ HTTPREAD_HDR_TYPE_POST = 4, /* hdr begins with POST<sp> */ HTTPREAD_HDR_TYPE_PUT = 5, /* hdr begins with ... */ HTTPREAD_HDR_TYPE_DELETE = 6, /* hdr begins with ... */ HTTPREAD_HDR_TYPE_TRACE = 7, /* hdr begins with ... */ HTTPREAD_HDR_TYPE_CONNECT = 8, /* hdr begins with ... */ HTTPREAD_HDR_TYPE_NOTIFY = 9, /* hdr begins with ... */ HTTPREAD_HDR_TYPE_M_SEARCH = 10, /* hdr begins with ... */ HTTPREAD_HDR_TYPE_M_POST = 11, /* hdr begins with ... */ HTTPREAD_HDR_TYPE_SUBSCRIBE = 12, /* hdr begins with ... */ HTTPREAD_HDR_TYPE_UNSUBSCRIBE = 13, /* hdr begins with ... */ HTTPREAD_N_HDR_TYPES /* keep last */ }; /* control instance -- opaque struct declaration */ struct httpread; /* httpread_destroy -- if h is non-NULL, clean up * This must eventually be called by the application following * call of the application's callback and may be called * earlier if desired. */ void httpread_destroy(struct httpread *h); /* httpread_create -- start a new reading session making use of eloop. * The new instance will use the socket descriptor for reading (until * it gets a file and not after) but will not close the socket, even * when the instance is destroyed (the application must do that). * Return NULL on error. * * Provided that httpread_create successfully returns a handle, * the callback fnc is called to handle httpread_event events. * The caller should do destroy on any errors or unknown events. * * Pass max_bytes == 0 to not read body at all (required for e.g. * reply to HEAD request). */ struct httpread * httpread_create( int sd, /* descriptor of TCP socket to read from */ void (*cb)(struct httpread *handle, void *cookie, enum httpread_event e), /* call on event */ void *cookie, /* pass to callback */ int max_bytes, /* maximum file size else abort it */ int timeout_seconds /* 0; or total duration timeout period */ ); /* httpread_hdr_type_get -- When file is ready, returns header type. */ enum httpread_hdr_type httpread_hdr_type_get(struct httpread *h); /* httpread_uri_get -- When file is ready, uri_get returns (translated) URI * or possibly NULL (which would be an error). */ char *httpread_uri_get(struct httpread *h); /* httpread_reply_code_get -- When reply is ready, returns reply code */ int httpread_reply_code_get(struct httpread *h); /* httpread_length_get -- When file is ready, returns file length. */ int httpread_length_get(struct httpread *h); /* httpread_data_get -- When file is ready, returns file content * with null byte appened. * Might return NULL in some error condition. */ void * httpread_data_get(struct httpread *h); /* httpread_hdr_get -- When file is ready, returns header content * with null byte appended. * Might return NULL in some error condition. */ char * httpread_hdr_get(struct httpread *h); /* httpread_hdr_line_get -- When file is ready, returns pointer * to line within header content matching the given tag * (after the tag itself and any spaces/tabs). * * The tag should end with a colon for reliable matching. * * If not found, returns NULL; */ char * httpread_hdr_line_get(struct httpread *h, const char *tag); #endif /* HTTPREAD_H */
Upload File
Create Folder