]>
git.ipfire.org Git - people/stevee/aiccu.git/blob - common/aiccu_kame.c
1 /**********************************************************
2 SixXS - Automatic IPv6 Connectivity Configuration Utility
3 ***********************************************************
4 Copyright 2003-2005 SixXS - http://www.sixxs.net
5 ***********************************************************
6 common/aiccu_kame.c - NetBSD + FreeBSD 5.x+
7 ***********************************************************
9 $Id: aiccu_kame.c,v 1.15 2007-01-11 15:11:27 jeroen Exp $
10 $Date: 2007-01-11 15:11:27 $
11 **********************************************************/
15 bool aiccu_os_install(void)
20 bool aiccu_os_setup(struct TIC_Tunnel
*hTunnel
)
22 if (hTunnel
->uses_tundev
== 0)
25 "/sbin/ifconfig %s create",
26 g_aiccu
->ipv6_interface
);
29 "/sbin/ifconfig %s tunnel %s %s",
30 g_aiccu
->ipv6_interface
,
31 strcmp(hTunnel
->sIPv4_Local
, "heartbeat") == 0 ? "0.0.0.0" : hTunnel
->sIPv4_Local
,
37 g_aiccu
->ipv6_interface
);
41 g_aiccu
->ipv6_interface
,
44 if (hTunnel
->uses_tundev
== 1)
46 /* Configure a generated linklocal address */
48 "ifconfig %s inet6 %s prefixlen 64 alias",
49 g_aiccu
->ipv6_interface
,
50 hTunnel
->sIPv6_LinkLocal
);
53 /* PtP link, so we can use the PtP syntax */
55 "ifconfig %s inet6 %s %s prefixlen 128 alias",
56 g_aiccu
->ipv6_interface
,
60 if (g_aiccu
->defaultroute
)
63 "route add -inet6 %s %s",
71 void aiccu_os_reconfig(struct TIC_Tunnel
*hTunnel
)
73 if (hTunnel
->uses_tundev
== 0)
76 "/sbin/ifconfig %s tunnel %s %s",
77 g_aiccu
->ipv6_interface
,
83 void aiccu_os_delete(struct TIC_Tunnel
*hTunnel
)
88 g_aiccu
->ipv6_interface
);
90 if (hTunnel
->uses_tundev
== 0)
93 "ifconfig %s deletetunnel",
94 g_aiccu
->ipv6_interface
);