summaryrefslogtreecommitdiff
path: root/uhttpd.h
diff options
context:
space:
mode:
authorFelix Fietkau <nbd@openwrt.org>2013-01-02 13:23:55 +0100
committerFelix Fietkau <nbd@openwrt.org>2013-01-02 13:23:55 +0100
commita6aca5fc1be4409c47f88f730814b41dc9c95475 (patch)
treef883efdeb876353c6934f45be8b8c4263437a0ca /uhttpd.h
parent24c193233ddf29cd9f0ccf6f1914db85aa9b5dc7 (diff)
add local/remote address env vars for cgi
Diffstat (limited to 'uhttpd.h')
-rw-r--r--uhttpd.h12
1 files changed, 10 insertions, 2 deletions
diff --git a/uhttpd.h b/uhttpd.h
index 24ad83d..3cbe46f 100644
--- a/uhttpd.h
+++ b/uhttpd.h
@@ -136,6 +136,15 @@ struct dispatch_handler {
void (*handle_request)(struct client *cl, const char *url, struct path_info *pi);
};
+struct uh_addr {
+ uint8_t family;
+ uint16_t port;
+ union {
+ struct in_addr in;
+ struct in6_addr in6;
+ };
+};
+
struct client {
struct list_head list;
int id;
@@ -150,8 +159,7 @@ struct client {
enum client_state state;
struct http_request request;
- struct sockaddr_in6 servaddr;
- struct sockaddr_in6 peeraddr;
+ struct uh_addr srv_addr, peer_addr;
struct blob_buf hdr;