[w3m-dev 03967] Re: IPv4/IPv6 only option patch

* NEWS: options: -4, -6
* fm.h (DNS_ORDER_INET_ONLY): added
	(DNS_ORDER_INET6_ONLY): added
	(ai_family_order_table): [3]->[7]
* main.c (fusage): add -4/-6
	(main): -4/-6 mapped to dns_order=4/dns_order=6
* rc.c (dnsorders): add DNS_ORDER_INET_ONLY, DNS_ORDER_INET6_ONLY
* url.c (dnsorders): add 3-6
From: Fumitoshi UKAI  <ukai@debian.or.jp>
This commit is contained in:
Fumitoshi UKAI
2003-09-22 17:37:40 +00:00
parent d29dc6b852
commit f9f7f794a2
6 changed files with 37 additions and 8 deletions

10
url.c
View File

@@ -1,4 +1,4 @@
/* $Id: url.c,v 1.81 2003/06/17 18:03:55 ukai Exp $ */
/* $Id: url.c,v 1.82 2003/09/22 17:37:41 ukai Exp $ */
#include "fm.h"
#include <sys/types.h>
#include <sys/socket.h>
@@ -33,10 +33,14 @@
#ifdef INET6
/* see rc.c, "dns_order" and dnsorders[] */
int ai_family_order_table[3][3] = {
int ai_family_order_table[7][3] = {
{PF_UNSPEC, PF_UNSPEC, PF_UNSPEC}, /* 0:unspec */
{PF_INET, PF_INET6, PF_UNSPEC}, /* 1:inet inet6 */
{PF_INET6, PF_INET, PF_UNSPEC} /* 2:inet6 inet */
{PF_INET6, PF_INET, PF_UNSPEC}, /* 2:inet6 inet */
{PF_UNSPEC, PF_UNSPEC, PF_UNSPEC}, /* 3: --- */
{PF_INET, PF_UNSPEC, PF_UNSPEC}, /* 4:inet */
{PF_UNSPEC, PF_UNSPEC, PF_UNSPEC}, /* 5: --- */
{PF_INET6, PF_UNSPEC, PF_UNSPEC}, /* 6:inet6 */
};
#endif /* INET6 */