Also make sure getopt.h is included.
dnl Process this file with autoconf to produce a configure script.
-dnl $Id: configure.in,v 1.13.2.75 2003/07/30 09:45:20 guus Exp $
+dnl $Id: configure.in,v 1.13.2.76 2003/07/30 11:50:44 guus Exp $
AC_PREREQ(2.57)
AC_INIT(src/tincd.c)
dnl Checks for header files.
AC_HEADER_STDC
-AC_CHECK_HEADERS([syslog.h sys/file.h sys/ioctl.h sys/param.h sys/time.h sys/socket.h sys/wait.h sys/mman.h netdb.h arpa/inet.h netinet/in_systm.h netinet/in.h])
+AC_CHECK_HEADERS([stdbool.h syslog.h sys/file.h sys/ioctl.h sys/param.h sys/time.h sys/socket.h sys/wait.h sys/mman.h netdb.h arpa/inet.h netinet/in_systm.h netinet/in.h])
AC_CHECK_HEADERS([net/ethernet.h net/if.h net/if_arp.h netinet/if_ether.h netinet/ip.h netinet/tcp.h netinet/ip_icmp.h netinet/ip6.h netinet/icmp6.h],
[], [],
[#ifdef HAVE_SYS_TYPES_H
along with this program; if not, write to the Free Software
Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
- $Id: edge.c,v 1.1.2.24 2003/07/29 10:50:15 guus Exp $
+ $Id: edge.c,v 1.1.2.25 2003/07/30 11:50:45 guus Exp $
*/
#include "system.h"
edge_t *lookup_edge(node_t *from, node_t *to)
{
- edge_t v = {
- .from = from,
- .to = to
- };
-
+ edge_t v;
+
cp();
+ v.from = from;
+ v.to = to;
+
return avl_search(from->edge_tree, &v);
}
along with this program; if not, write to the Free Software
Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
- $Id: net_setup.c,v 1.1.2.40 2003/07/29 22:59:00 guus Exp $
+ $Id: net_setup.c,v 1.1.2.41 2003/07/30 11:50:45 guus Exp $
*/
#include "system.h"
char *name, *hostname, *mode, *afname, *cipher, *digest;
char *address = NULL;
char *envp[5];
- struct addrinfo hint, *ai, *aip;
+ struct addrinfo *ai, *aip, hint = {0};
bool choice;
int i, err;
get_config_string(lookup_config(config_tree, "BindToAddress"), &address);
- hint = (struct addrinfo) {
- .ai_family = addressfamily,
- .ai_socktype = SOCK_STREAM,
- .ai_protocol = IPPROTO_TCP,
- .ai_flags = AI_PASSIVE,
- };
+ hint.ai_family = addressfamily;
+ hint.ai_socktype = SOCK_STREAM;
+ hint.ai_protocol = IPPROTO_TCP;
+ hint.ai_flags = AI_PASSIVE;
err = getaddrinfo(address, myport, &hint, &ai);
along with this program; if not, write to the Free Software
Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
- $Id: netutl.c,v 1.12.4.50 2003/07/29 22:59:00 guus Exp $
+ $Id: netutl.c,v 1.12.4.51 2003/07/30 11:50:45 guus Exp $
*/
#include "system.h"
*/
struct addrinfo *str2addrinfo(const char *address, const char *service, int socktype)
{
- struct addrinfo *ai;
- struct addrinfo hint = {
- .ai_family = addressfamily,
- .ai_socktype = socktype,
- };
+ struct addrinfo *ai, hint = {0};
int err;
cp();
+ hint.ai_family = addressfamily;
+ hint.ai_socktype = socktype;
+
err = getaddrinfo(address, service, &hint, &ai);
if(err) {
sockaddr_t str2sockaddr(const char *address, const char *port)
{
- struct addrinfo *ai;
- struct addrinfo hint = {
- .ai_family = AF_UNSPEC,
- .ai_flags = AI_NUMERICHOST,
- .ai_socktype = SOCK_STREAM,
- };
+ struct addrinfo *ai, hint = {0};
sockaddr_t result;
int err;
cp();
+ hint.ai_family = AF_UNSPEC;
+ hint.ai_flags = AI_NUMERICHOST;
+ hint.ai_socktype = SOCK_STREAM;
+
err = getaddrinfo(address, port, &hint, &ai);
if(err || !ai) {
along with this program; if not, write to the Free Software
Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
- $Id: node.c,v 1.1.2.25 2003/07/29 10:50:15 guus Exp $
+ $Id: node.c,v 1.1.2.26 2003/07/30 11:50:45 guus Exp $
*/
#include "system.h"
node_t *lookup_node(char *name)
{
- node_t n = {
- .name = name,
- };
+ node_t n = {0};
cp();
+ n.name = name;
+
return avl_search(node_tree, &n);
}
node_t *lookup_node_udp(const sockaddr_t *sa)
{
- node_t n = {
- .address = *sa,
- .name = NULL,
- };
+ node_t n = {0};
cp();
+ n.address = *sa;
+ n.name = NULL;
+
return avl_search(node_udp_tree, &n);
}
along with this program; if not, write to the Free Software
Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
- $Id: protocol.c,v 1.28.4.144 2003/07/29 10:50:15 guus Exp $
+ $Id: protocol.c,v 1.28.4.145 2003/07/30 11:50:45 guus Exp $
*/
#include "system.h"
bool seen_request(char *request)
{
- past_request_t p = {
- .request = request,
- };
- past_request_t *new;
+ past_request_t *new, p = {0};
cp();
+ p.request = request;
+
if(avl_search(past_request_tree, &p)) {
ifdebug(SCARY_THINGS) logger(LOG_DEBUG, _("Already seen request"));
return true;
along with this program; if not, write to the Free Software
Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
- $Id: subnet.c,v 1.1.2.48 2003/07/24 12:08:16 guus Exp $
+ $Id: subnet.c,v 1.1.2.49 2003/07/30 11:50:45 guus Exp $
*/
#include "system.h"
subnet_t *lookup_subnet_mac(const mac_t *address)
{
- subnet_t subnet = {
- .type = SUBNET_MAC,
- .net.mac.address = *address,
- .owner = NULL
- };
- subnet_t *p;
+ subnet_t *p, subnet = {0};
cp();
+ subnet.type = SUBNET_MAC;
+ subnet.net.mac.address = *address;
+ subnet.owner = NULL;
+
p = (subnet_t *) avl_search(subnet_tree, &subnet);
return p;
subnet_t *lookup_subnet_ipv4(const ipv4_t *address)
{
- subnet_t subnet = {
- .type = SUBNET_IPV4,
- .net.ipv4.address = *address,
- .net.ipv4.prefixlength = 32,
- .owner = NULL
- };
- subnet_t *p;
+ subnet_t *p, subnet = {0};
cp();
+ subnet.type = SUBNET_IPV4;
+ subnet.net.ipv4.address = *address;
+ subnet.net.ipv4.prefixlength = 32;
+ subnet.owner = NULL;
+
do {
/* Go find subnet */
subnet_t *lookup_subnet_ipv6(const ipv6_t *address)
{
- subnet_t subnet = {
- .type = SUBNET_IPV6,
- .net.ipv6.address = *address,
- .net.ipv6.prefixlength = 128,
- .owner = NULL
- };
- subnet_t *p;
+ subnet_t *p, subnet = {0};
cp();
+ subnet.type = SUBNET_IPV6;
+ subnet.net.ipv6.address = *address;
+ subnet.net.ipv6.prefixlength = 128;
+ subnet.owner = NULL;
+
do {
/* Go find subnet */
along with this program; if not, write to the Free Software
Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
- $Id: tincd.c,v 1.10.4.78 2003/07/29 22:59:00 guus Exp $
+ $Id: tincd.c,v 1.10.4.79 2003/07/30 11:50:45 guus Exp $
*/
#include "system.h"
#include <lzo1x.h>
+#include <getopt.h>
+
#include "conf.h"
#include "logger.h"
#include "net.h"