Sync usage with man page.
[netbsd-mini2440.git] / dist / ipf / lib / load_url.c
blob3da420d2c50925b5f6ebc348b49c8527727b8b09
1 /* $NetBSD$ */
3 /*
4 * Copyright (C) 2006 by Darren Reed.
6 * See the IPFILTER.LICENCE file for details on licencing.
8 * Id: load_url.c,v 1.1.2.1 2006/08/25 21:13:04 darrenr Exp
9 */
11 #include "ipf.h"
13 alist_t *
14 load_url(char *url)
16 alist_t *hosts = NULL;
18 if (strncmp(url, "file://", 7) == 0) {
19 /*
20 * file:///etc/passwd
21 * ^------------s
22 */
23 hosts = load_file(url);
25 } else if (*url == '/' || *url == '.') {
26 hosts = load_file(url);
28 } else if (strncmp(url, "http://", 7) == 0) {
29 hosts = load_http(url);
32 return hosts;