forked from DC-SWAT/DreamShell
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathhttp.h
More file actions
41 lines (29 loc) · 825 Bytes
/
http.h
File metadata and controls
41 lines (29 loc) · 825 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
/**
* \file http.h
* \brief HTTP protocol
* \date 2007-2014
* \author SWAT www.dc-swat.ru
*/
#ifndef _DS_HTTP_H
#define _DS_HTTP_H
#include <kos/net.h>
#include <sys/socket.h>
/* File systems */
int tcpfs_init();
void tcpfs_shutdown();
int httpfs_init();
void httpfs_shutdown();
/* DSN utils */
int dns_init(const uint8 *ip);
int dns(const char *name, struct in_addr* addr);
int ds_gethostbyname(const struct sockaddr_in * dnssrv, const char *name, uint8 *ipout);
/* URL utils */
void _url_split(char *proto, int proto_size,
char *hostname, int hostname_size,
int *port_ptr,
char *path, int path_size,
const char *url);
/* httpd server */
int httpd_init(int port);
void httpd_shutdown();
#endif /* _DS_HTTP_H */