Revert "Added upstream changelog"
[aiccu.git] / common / aiccu_sunos.c
blobc1f2cc982c15f9aa304e10d046c035aa6a0dc59a
1 /**********************************************************
2 SixXS - Automatic IPv6 Connectivity Configuration Utility
3 ***********************************************************
4 Copyright 2003-2005 SixXS - http://www.sixxs.net
5 ***********************************************************
6 common/aiccu_sunos.c - Sun Solaris / SunOS
8 ipv6_interface has to be eg ip.tun0
9 ***********************************************************
10 $Author: jeroen $
11 $Id: aiccu_sunos.c,v 1.3 2006-07-23 14:13:57 jeroen Exp $
12 $Date: 2006-07-23 14:13:57 $
13 **********************************************************/
15 #include "aiccu.h"
17 bool aiccu_os_install(void)
19 return true;
22 bool aiccu_os_setup(struct TIC_Tunnel *hTunnel)
24 if (hTunnel->uses_tundev == 0)
26 aiccu_exec(
27 "/sbin/ifconfig %s inet6 plumb tsrc %s tdst %s up",
28 g_aiccu->ipv6_interface,
29 strcmp(hTunnel->sIPv4_Local, "heartbeat") == 0 ? "0.0.0.0" : hTunnel->sIPv4_Local,
30 hTunnel->sIPv4_POP);
32 aiccu_exec(
33 "ifconfig %s inet6 addif %s %s up",
34 g_aiccu->ipv6_interface,
35 hTunnel->sIPv6_Local,
36 hTunnel->sIPv6_POP);
38 else
40 dolog(LOG_DEBUG, "There is no Solaris support for tun-devices yet");
41 exit(-1);
44 if (g_aiccu->defaultroute)
46 aiccu_exec(
47 "route add -inet6 %s %s",
48 "default",
49 hTunnel->sIPv6_POP);
52 return true;
55 void aiccu_os_reconfig(struct TIC_Tunnel *hTunnel)
57 if (hTunnel->uses_tundev == 0)
59 aiccu_exec(
60 "/sbin/ifconfig %s inet6 plumb tsrc %s tdst %s up",
61 g_aiccu->ipv6_interface,
62 strcmp(hTunnel->sIPv4_Local, "heartbeat") == 0 ? "0.0.0.0" : hTunnel->sIPv4_Local,
63 hTunnel->sIPv4_POP);
67 void aiccu_os_delete(struct TIC_Tunnel *hTunnel)
69 hTunnel = hTunnel;
70 aiccu_exec(
71 "ifconfig %s down",
72 g_aiccu->ipv6_interface);