apportate/src/support.h

41 lines
585 B
C
Raw Normal View History

2022-11-24 08:18:05 +00:00
/* return codes */
enum
{
/* failed to allocate or otherwise access memory */
ERRMEM = -20,
/* URI appears to be malformed */
ERRMALF,
/* couldn't create a socket */
ERRSOCK,
/* addrinfo couldn't init */
ERRADDR,
/* couldn't connect */
ERRCONN,
ERRUSAGE,
/* */
/* no error, everything is okay */
ERROKAY = 0
};
typedef struct
{
char *proto;
char *fqdn;
char *path;
} uri;
char *reqgen(uri *urip);
2022-12-13 17:12:07 +00:00
int resp_parse(char *data, uri *uristruct);
2022-11-24 08:18:05 +00:00
char *substr_extract(const char *str, int start, int end);
2023-02-19 20:44:19 +00:00
char *buftolower(char *bufp);