1 /**********************************************************
2 SixXS - Automatic IPv6 Connectivity Configuration Utility
3 ***********************************************************
4 Copyright 2003-2005 SixXS - http://www.sixxs.net
5 ***********************************************************
6 common/aiccu_aix.c - AIX
8 ipv6_interface has to be eg cti0
9 ***********************************************************
11 $Id: aiccu_aix.c,v 1.3 2006-07-23 14:13:57 jeroen Exp $
12 $Date: 2006-07-23 14:13:57 $
13 **********************************************************/
17 bool aiccu_os_install()
19 /* Define the CTI (Configured Tunnel Interface) by executing the deftunnel configuration method */
20 return aiccu_exec("/usr/lib/methods/deftunnel -c if -s CTI -t cti");
23 bool aiccu_os_setup(struct TIC_Tunnel
*hTunnel
)
25 if (hTunnel
->uses_tundev
== 0)
27 /* Build a normal SIT tunnel */
29 "/usr/sbin/ifconfig %s inet6 ::%s/128 ::%s",
30 g_aiccu
->ipv6_interface
,
31 strcmp(hTunnel
->sIPv4_Local
, "heartbeat") == 0 ? "0.0.0.0" : hTunnel
->sIPv4_Local
,
34 /* Remove the local endpoint, the remote stays though :) */
36 "/usr/sbin/ifconfig %s inet6 ::%s delete",
37 g_aiccu
->ipv6_interface
,
38 strcmp(hTunnel
->sIPv4_Local
, "heartbeat") == 0 ? "0.0.0.0" : hTunnel
->sIPv4_Local
);
40 /* Add the addresses */
42 "ifconfig %s inet6 %s %s",
43 g_aiccu
->ipv6_interface
,
49 dolog(LOG_DEBUG
, "There is no AIX support for tun-devices yet");
53 if (g_aiccu
->defaultroute
)
56 "route add -inet6 %s %s",
64 void aiccu_os_reconfig(struct TIC_Tunnel
*hTunnel
)
66 if (hTunnel
->uses_tundev
== 0)
68 /* Build a normal SIT tunnel */
70 "/usr/sbin/ifconfig %s inet6 ::%s/128 ::%s",
71 g_aiccu
->ipv6_interface
,
72 strcmp(hTunnel
->sIPv4_Local
, "heartbeat") == 0 ? "0.0.0.0" : hTunnel
->sIPv4_Local
,
75 /* Remove the local endpoint, the remote stays */
77 "/usr/sbin/ifconfig %s inet6 ::%s delete",
78 g_aiccu
->ipv6_interface
,
79 strcmp(hTunnel
->sIPv4_Local
, "heartbeat") == 0 ? "0.0.0.0" : hTunnel
->sIPv4_Local
);
83 void aiccu_os_delete(struct TIC_Tunnel
*hTunnel
)
88 g_aiccu
->ipv6_interface
);