123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263 |
- /*
- * yuarel.h
- *
- * Created on: 2022/12/9
- * Author: folus
- */
- #ifndef YUAREL_H_
- #define YUAREL_H_
- #include <sys/types.h>
- #include <sys/stat.h>
- #include <sys/time.h>
- #include <sys/timeb.h>
- #include <sys/types.h>
- #include <sys/ioctl.h>
- #include <sys/socket.h>
- #include <sys/ipc.h>
- #include <sys/shm.h>
- #include <sys/mman.h>
- #include <linux/wireless.h>
- #include <arpa/inet.h>
- #include <netinet/in.h>
- #include <dirent.h>
- #include <unistd.h>
- #include <stdarg.h>
- #include <stdio.h>
- #include <stdlib.h>
- #include <unistd.h>
- #include <fcntl.h>
- #include <termios.h>
- #include <errno.h>
- #include <errno.h>
- #include <string.h>
- #include <time.h>
- #include <ctype.h>
- #include <ifaddrs.h>
- #include <stdbool.h>
- #include <stddef.h>
- #include <stdint.h>
- struct yuarel {
- char *scheme; /* scheme, without ":" and "//" */
- char *username; /* username, default: NULL */
- char *password; /* password, default: NULL */
- char *host; /* hostname or IP address */
- int port; /* port, default: 0 */
- char *path; /* path, without leading "/", default: NULL */
- char *query; /* query, default: NULL */
- char *fragment; /* fragment, default: NULL */
- };
- /* A struct to hold the query string parameter values. */
- struct yuarel_param {
- char *key;
- char *val;
- };
- extern int yuarel_parse(struct yuarel *url, char *url_str);
- extern int yuarel_split_path(char *path, char **parts, int max_parts);
- extern int yuarel_parse_query(char *query, char delimiter, struct yuarel_param *params, int max_params);
- #endif /* YUAREL_H_ */
|