This code is based on the ddclient Perl-script by Paul Burry: http://members.rogers.com/ddclient/pub/ddclient.tar.gz
Definition in file DYNIP.C.
Go to the source code of this file.
Data Structures | |
| struct | URL |
Functions | |
| int | get_url (const char *host, int port, const char *path, const char *user_pass) |
| Fetch a single URL optionally with authentication. | |
| const char * | parse_myip_address (const char *buf) |
| Parse response buffer and find the first IP-address. | |
| int | parse_dyndns_response (const char *buf) |
| Parse the status response from DynDNS. | |
| int | chkip_method (const char *value) |
| Select method of getting your public IP (WAN-side) address. | |
| int | dyndns_params (const char *value) |
| Extracts the host, port and request from the value. | |
| void | url_free (struct URL *url) |
| Free the URL. | |
| BOOL | url_parse (struct URL *res, const char *url) |
| Simple URL parser; accepts only "http://" prefixes (optional). | |
| void | dynip_config (const char *name, const char *value) |
| Parser for DYNIP configuration. | |
| void | dynip_exit (void) |
| Free allocated memory. | |
| void | dynip_init (void) |
| int | dynip_exec (void) |
| int | base64encode (const char *in, char *out, size_t out_len) |
| BOOL | get_header (void *sock, long *cont_len_ptr) |
| Receive and parse the HYTTP header. | |
Variables | |
| char | dyndns_user [MAX_VALUELEN+1] = "" |
| char | dyndns_passwd [MAX_VALUELEN+1] = "" |
| char | dyn_myhostname [MAX_VALUELEN+1] = "" |
| char | dyn_myip [20] = "" |
| BOOL | dynip_enable = FALSE |
| int | dyndns_refresh = 3600 |
| int | trace_level = 0 |
| char | config_file [MAX_PATHLEN+1] = "$(TEMP)\\W32DYNIP.TMP" |
| URL | dyndns |
| URL | chkip = { NULL, NULL, 0, FALSE } |
| char | resp_buf [2048] |
| void(* | prev_hook )(const char *, const char *) |
|
|
Select method of getting your public IP (WAN-side) address. Either a dotted IPv4 address or an URL to return your address. Definition at line 366 of file DYNIP.C. References isaddr(), StrLcpy(), url_free(), and url_parse(). |
|
|
Extracts the host, port and request from the value. Used for sending the DynDNS IP/host update. Definition at line 382 of file DYNIP.C. References url_free(), and url_parse(). |
|
||||||||||||
|
Parser for DYNIP configuration. Matches all "\c DYNIP.xx" values from WATTCP.CFG file and make appropriate actions. Definition at line 91 of file DYNIP.C. References ARG_ATOI, ARG_FUNC, ARG_STRCPY, chkip_method(), dyndns_params(), and parse_config_table(). |
|
||||||||||||
|
Receive and parse the HYTTP header. Return FALSE if header isn't correct. Return TRUE and extract "Content-Length" field. Definition at line 475 of file DYNIP.C. References BYTE. |
|
|
Parse response buffer and find the first IP-address. 'buf' must be 0-terminated. Definition at line 213 of file DYNIP.C. |
|
||||||||||||
|
Simple URL parser; accepts only "http://" prefixes (optional). Extracts host, port and request parts ("/" if not present). Definition at line 297 of file DYNIP.C. References StrLcpy(). |
|
|
Initial value: Definition at line 66 of file DYNIP.C. |
1.3.8