From (spam-protected) Sun Mar 11 21:59:19 2007 From: (spam-protected) (Bernd Petrovitsch) Date: Sun, 11 Mar 2007 20:59:19 +0000 Subject: [Olsr-cvs] olsrd-current/lib/quagga/src olsrd_plugin.c, 1.1, 1.2 quagga.c, 1.1, 1.2 Message-ID: Update of /cvsroot/olsrd/olsrd-current/lib/quagga/src In directory sc8-pr-cvs3.sourceforge.net:/tmp/cvs-serv24266/src Modified Files: olsrd_plugin.c quagga.c Log Message: * update from svn://dev.durchdieluft.net/olsr-quagga/trunk/quagga Index: olsrd_plugin.c =================================================================== RCS file: /cvsroot/olsrd/olsrd-current/lib/quagga/src/olsrd_plugin.c,v retrieving revision 1.1 retrieving revision 1.2 diff -C2 -d -r1.1 -r1.2 *** olsrd_plugin.c 31 Jan 2007 12:38:26 -0000 1.1 --- olsrd_plugin.c 11 Mar 2007 20:59:17 -0000 1.2 *************** *** 90,94 **** int olsrd_plugin_init() { if(olsr_cnf->ip_version != AF_INET) { ! fputs("see the source - ipv4 so far not supportet\n" ,stderr); return 1; } --- 90,94 ---- int olsrd_plugin_init() { if(olsr_cnf->ip_version != AF_INET) { ! fputs("see the source - ipv6 so far not supportet\n" ,stderr); return 1; } Index: quagga.c =================================================================== RCS file: /cvsroot/olsrd/olsrd-current/lib/quagga/src/quagga.c,v retrieving revision 1.1 retrieving revision 1.2 diff -C2 -d -r1.1 -r1.2 *** quagga.c 31 Jan 2007 12:38:26 -0000 1.1 --- quagga.c 11 Mar 2007 20:59:17 -0000 1.2 *************** *** 21,25 **** #define HAVE_SOCKLEN_T - #include #include --- 21,24 ---- *************** *** 27,30 **** --- 26,30 ---- #include #include + #include #include "quagga.h" From (spam-protected) Sun Mar 11 21:59:19 2007 From: (spam-protected) (Bernd Petrovitsch) Date: Sun, 11 Mar 2007 20:59:19 +0000 Subject: [Olsr-cvs] olsrd-current/lib/quagga Makefile,1.3,1.4 Message-ID: Update of /cvsroot/olsrd/olsrd-current/lib/quagga In directory sc8-pr-cvs3.sourceforge.net:/tmp/cvs-serv24266 Modified Files: Makefile Log Message: * update from svn://dev.durchdieluft.net/olsr-quagga/trunk/quagga Index: Makefile =================================================================== RCS file: /cvsroot/olsrd/olsrd-current/lib/quagga/Makefile,v retrieving revision 1.3 retrieving revision 1.4 diff -C2 -d -r1.3 -r1.4 *** Makefile 10 Feb 2007 17:36:51 -0000 1.3 --- Makefile 11 Mar 2007 20:59:17 -0000 1.4 *************** *** 53,63 **** include $(TOPDIR)/Makefile.inc ! ifneq ($(OS),linux) ! ! default_target install clean: ! @echo "*** Quagga Plugin only supported on Linux, sorry!" ! else - default_target: $(PLUGIN_FULLNAME) --- 53,60 ---- include $(TOPDIR)/Makefile.inc ! ifeq ($(OS),win32) ! default_target install clean: ! @echo "**** Quagga not supportet on Windows (so it would be pointless to build the Quagga Plugin" else default_target: $(PLUGIN_FULLNAME) *************** *** 71,74 **** clean: rm -f $(OBJS) $(SRCS:%.c=%.d) $(PLUGIN_FULLNAME) - endif --- 68,70 ---- From (spam-protected) Mon Mar 12 00:26:09 2007 From: (spam-protected) (Bernd Petrovitsch) Date: Sun, 11 Mar 2007 23:26:09 +0000 Subject: [Olsr-cvs] olsrd-current/lib/quagga/src olsrd_plugin.c, 1.2, 1.3 quagga.c, 1.2, 1.3 quagga.h, 1.1, 1.2 Message-ID: Update of /cvsroot/olsrd/olsrd-current/lib/quagga/src In directory sc8-pr-cvs3.sourceforge.net:/tmp/cvs-serv24090/src Modified Files: olsrd_plugin.c quagga.c quagga.h Log Message: * another update from svn://dev.durchdieluft.net/olsr-quagga/trunk/quagga Index: olsrd_plugin.c =================================================================== RCS file: /cvsroot/olsrd/olsrd-current/lib/quagga/src/olsrd_plugin.c,v retrieving revision 1.2 retrieving revision 1.3 diff -C2 -d -r1.2 -r1.3 *** olsrd_plugin.c 11 Mar 2007 20:59:17 -0000 1.2 --- olsrd_plugin.c 11 Mar 2007 23:26:06 -0000 1.3 *************** *** 71,75 **** } else if (!strcmp(key, "Distance")) { ! unsigned int distance = atoi (key); if (distance < 255) zebra_olsr_distance(distance); --- 71,75 ---- } else if (!strcmp(key, "Distance")) { ! unsigned int distance = atoi (value); if (distance < 255) zebra_olsr_distance(distance); *************** *** 78,84 **** else if (!strcmp(key, "LocalPref")) { ! if (!strcmp(key, "true")) zebra_olsr_localpref(); ! else if (strcmp (key, "false")) return -1; return 1; --- 78,84 ---- else if (!strcmp(key, "LocalPref")) { ! if (!strcmp(value, "true")) zebra_olsr_localpref(); ! else if (strcmp (value, "false")) return -1; return 1; Index: quagga.h =================================================================== RCS file: /cvsroot/olsrd/olsrd-current/lib/quagga/src/quagga.h,v retrieving revision 1.1 retrieving revision 1.2 diff -C2 -d -r1.1 -r1.2 *** quagga.h 31 Jan 2007 12:38:26 -0000 1.1 --- quagga.h 11 Mar 2007 23:26:06 -0000 1.2 *************** *** 48,52 **** uint32_t *index; uint32_t metric; ! uint32_t distance; struct ipv4_route *next; }; --- 48,52 ---- uint32_t *index; uint32_t metric; ! uint8_t distance; struct ipv4_route *next; }; Index: quagga.c =================================================================== RCS file: /cvsroot/olsrd/olsrd-current/lib/quagga/src/quagga.c,v retrieving revision 1.2 retrieving revision 1.3 diff -C2 -d -r1.2 -r1.3 *** quagga.c 11 Mar 2007 20:59:17 -0000 1.2 --- quagga.c 11 Mar 2007 23:26:06 -0000 1.3 *************** *** 156,160 **** int init_zebra () { ! if (!zebra_connect()) { olsr_exit ("AIIIII, could not connect to zebra! is zebra running?", EXIT_FAILURE); --- 156,160 ---- int init_zebra () { ! if (zebra_connect() < 0 || !(zebra.status&STATUS_CONNECTED)) { olsr_exit ("AIIIII, could not connect to zebra! is zebra running?", EXIT_FAILURE); *************** *** 167,171 **** int i; ! if (!zebra_connect()) // log: zebra-reconnect failed ; --- 167,171 ---- int i; ! if (zebra_connect() < 0 || !(zebra.status&STATUS_CONNECTED)) // log: zebra-reconnect failed ; *************** *** 356,360 **** *optlen += r.ind_num * sizeof *r.index + 1; if (r.message & ZAPI_MESSAGE_DISTANCE) ! *optlen++; if (r.message & ZAPI_MESSAGE_METRIC) *optlen += sizeof r.metric; --- 356,360 ---- *optlen += r.ind_num * sizeof *r.index + 1; if (r.message & ZAPI_MESSAGE_DISTANCE) ! (*optlen)++; if (r.message & ZAPI_MESSAGE_METRIC) *optlen += sizeof r.metric; *************** *** 393,402 **** t += sizeof r.index * r.ind_num; } if (r.message & ZAPI_MESSAGE_METRIC) { memcpy (t, &r.metric, sizeof r.metric); t += sizeof r.metric; } - if (r.message & ZAPI_MESSAGE_DISTANCE) - *t++ = r.distance; return cmdopt; } --- 393,402 ---- t += sizeof r.index * r.ind_num; } + if (r.message & ZAPI_MESSAGE_DISTANCE) + *t++ = r.distance; if (r.message & ZAPI_MESSAGE_METRIC) { memcpy (t, &r.metric, sizeof r.metric); t += sizeof r.metric; } return cmdopt; } From (spam-protected) Mon Mar 12 00:26:09 2007 From: (spam-protected) (Bernd Petrovitsch) Date: Sun, 11 Mar 2007 23:26:09 +0000 Subject: [Olsr-cvs] olsrd-current/lib/quagga Makefile, 1.4, 1.5 README, 1.1, 1.2 Message-ID: Update of /cvsroot/olsrd/olsrd-current/lib/quagga In directory sc8-pr-cvs3.sourceforge.net:/tmp/cvs-serv24090 Modified Files: Makefile README Log Message: * another update from svn://dev.durchdieluft.net/olsr-quagga/trunk/quagga Index: README =================================================================== RCS file: /cvsroot/olsrd/olsrd-current/lib/quagga/README,v retrieving revision 1.1 retrieving revision 1.2 diff -C2 -d -r1.1 -r1.2 *** README 31 Jan 2007 12:38:26 -0000 1.1 --- README 11 Mar 2007 23:26:06 -0000 1.2 *************** *** 31,35 **** no routes are exportet if not set. ! PlParam "Localpref" "true" sets the zebra SELECTED-flag on the routes exported to zebra which means these routes are prefered in any case. --- 31,35 ---- no routes are exportet if not set. ! PlParam "LocalPref" "true" sets the zebra SELECTED-flag on the routes exported to zebra which means these routes are prefered in any case. *************** *** 50,55 **** PlParam "redistribute" "bgp" PlParam "ExportRoutes" "only" ! PlParam "Distance" "125" ! PlParam "Localpref" "false" } --- 50,55 ---- PlParam "redistribute" "bgp" PlParam "ExportRoutes" "only" ! PlParam "Distance" "125" ! PlParam "LocalPref" "false" } From (spam-protected) Wed Mar 14 14:59:32 2007 From: (spam-protected) (Bernd Petrovitsch) Date: Wed, 14 Mar 2007 13:59:32 +0000 Subject: [Olsr-cvs] olsrd-current/src/cfgparser olsrd_conf.c,1.50,1.51 Message-ID: Update of /cvsroot/olsrd/olsrd-current/src/cfgparser In directory sc8-pr-cvs3.sourceforge.net:/tmp/cvs-serv8824/src/cfgparser Modified Files: olsrd_conf.c Log Message: * killed a compiler warning Index: olsrd_conf.c =================================================================== RCS file: /cvsroot/olsrd/olsrd-current/src/cfgparser/olsrd_conf.c,v retrieving revision 1.50 retrieving revision 1.51 diff -C2 -d -r1.50 -r1.51 *** olsrd_conf.c 14 Sep 2006 08:03:29 -0000 1.50 --- olsrd_conf.c 14 Mar 2007 13:59:30 -0000 1.51 *************** *** 104,108 **** /* Stop the compiler from complaining */ ! strlen(copyright_string); cnf = malloc(sizeof(struct olsrd_config)); --- 104,108 ---- /* Stop the compiler from complaining */ ! (void)strlen(copyright_string); cnf = malloc(sizeof(struct olsrd_config)); From (spam-protected) Wed Mar 14 15:01:16 2007 From: (spam-protected) (Bernd Petrovitsch) Date: Wed, 14 Mar 2007 14:01:16 +0000 Subject: [Olsr-cvs] olsrd-current/src/bsd net.c,1.31,1.32 Message-ID: Update of /cvsroot/olsrd/olsrd-current/src/bsd In directory sc8-pr-cvs3.sourceforge.net:/tmp/cvs-serv9784/src/bsd Modified Files: net.c Log Message: * applied osx-ip6.patch made by GrĂ©goire Henry , posted on 2007-03-12 Index: net.c =================================================================== RCS file: /cvsroot/olsrd/olsrd-current/src/bsd/net.c,v retrieving revision 1.31 retrieving revision 1.32 diff -C2 -d -r1.31 -r1.32 *** net.c 14 Feb 2007 13:03:13 -0000 1.31 --- net.c 14 Mar 2007 14:01:13 -0000 1.32 *************** *** 74,77 **** --- 74,84 ---- #endif + #ifdef __MacOSX__ + #include + #include + #include + #include + #endif + #include #ifdef SPOOF *************** *** 91,95 **** --- 98,106 ---- { int old; + #if __MacOSX__ + size_t len = sizeof (old); + #else unsigned int len = sizeof (old); + #endif #ifdef __OpenBSD__ *************** *** 175,179 **** ignore_redir = set_sysctl_int(name, 0); ! #elif defined __FreeBSD__ if (olsr_cnf->ip_version == AF_INET) { --- 186,190 ---- ignore_redir = set_sysctl_int(name, 0); ! #elif defined __FreeBSD__ || defined __MacOSX__ if (olsr_cnf->ip_version == AF_INET) { *************** *** 257,261 **** name = "net.inet6.icmp6.rediraccept"; ! #elif defined __FreeBSD__ if (olsr_cnf->ip_version == AF_INET) name = "net.inet.icmp.drop_redirect"; --- 268,272 ---- name = "net.inet6.icmp6.rediraccept"; ! #elif defined __FreeBSD__ || defined __MacOSX__ if (olsr_cnf->ip_version == AF_INET) name = "net.inet.icmp.drop_redirect"; *************** *** 436,439 **** --- 447,451 ---- } + #ifdef IPV6_RECVPKTINFO if (setsockopt(sock, IPPROTO_IPV6, IPV6_RECVPKTINFO, &on, sizeof(on)) < 0) { *************** *** 441,444 **** --- 453,463 ---- return (-1); } + #elif defined IPV6_PKTINFO + if (setsockopt(sock, IPPROTO_IPV6, IPV6_PKTINFO, &on, sizeof(on)) < 0) + { + perror("IPV6_PKTINFO failed"); + return (-1); + } + #endif if (bind(sock, (struct sockaddr *)sin, sizeof (*sin)) < 0) From (spam-protected) Wed Mar 14 15:01:16 2007 From: (spam-protected) (Bernd Petrovitsch) Date: Wed, 14 Mar 2007 14:01:16 +0000 Subject: [Olsr-cvs] olsrd-current/src/unix ifnet.c,1.45,1.46 Message-ID: Update of /cvsroot/olsrd/olsrd-current/src/unix In directory sc8-pr-cvs3.sourceforge.net:/tmp/cvs-serv9784/src/unix Modified Files: ifnet.c Log Message: * applied osx-ip6.patch made by GrĂ©goire Henry , posted on 2007-03-12 Index: ifnet.c =================================================================== RCS file: /cvsroot/olsrd/olsrd-current/src/unix/ifnet.c,v retrieving revision 1.45 retrieving revision 1.46 diff -C2 -d -r1.45 -r1.46 *** ifnet.c 10 Feb 2007 19:59:51 -0000 1.45 --- ifnet.c 14 Mar 2007 14:01:14 -0000 1.46 *************** *** 818,821 **** --- 818,825 ---- ifs.int6_multaddr.sin6_port = htons(OLSRPORT); + #ifdef __MacOSX__ + ifs.int6_multaddr.sin6_scope_id = 0; + #endif + OLSR_PRINTF(debuglvl, "\tMulticast: %s\n", ip6_to_string(&ifs.int6_multaddr.sin6_addr)) From (spam-protected) Mon Mar 26 01:19:46 2007 From: (spam-protected) (Thomas Lopatic) Date: Sun, 25 Mar 2007 23:19:46 +0000 Subject: [Olsr-cvs] olsrd-current/src lq_avl.c,1.3,1.4 lq_avl.h,1.4,1.5 Message-ID: Update of /cvsroot/olsrd/olsrd-current/src In directory sc8-pr-cvs3.sourceforge.net:/tmp/cvs-serv19088/src Modified Files: lq_avl.c lq_avl.h Log Message: Added node deletion. Index: lq_avl.h =================================================================== RCS file: /cvsroot/olsrd/olsrd-current/src/lq_avl.h,v retrieving revision 1.4 retrieving revision 1.5 diff -C2 -d -r1.4 -r1.5 *** lq_avl.h 10 Feb 2007 17:36:51 -0000 1.4 --- lq_avl.h 25 Mar 2007 23:19:44 -0000 1.5 *************** *** 63,66 **** --- 63,67 ---- struct avl_node *avl_find(struct avl_tree *, void *); int avl_insert(struct avl_tree *, struct avl_node *); + void avl_delete(struct avl_tree *, struct avl_node *); #define inline_avl_comp_ipv4(ip1, ip2) \ Index: lq_avl.c =================================================================== RCS file: /cvsroot/olsrd/olsrd-current/src/lq_avl.c,v retrieving revision 1.3 retrieving revision 1.4 diff -C2 -d -r1.3 -r1.4 *** lq_avl.c 10 Feb 2007 17:36:51 -0000 1.3 --- lq_avl.c 25 Mar 2007 23:19:44 -0000 1.4 *************** *** 256,263 **** node = avl_find_rec(tree->root, new->key, tree->comp); ! if (0 == tree->comp) { diff = inline_avl_comp_ipv4(new->key, node->key); } ! else { diff = (*tree->comp)(new->key, node->key); } --- 256,266 ---- node = avl_find_rec(tree->root, new->key, tree->comp); ! if (0 == tree->comp) ! { diff = inline_avl_comp_ipv4(new->key, node->key); } ! ! else ! { diff = (*tree->comp)(new->key, node->key); } *************** *** 297,298 **** --- 300,545 ---- return 0; } + + static void post_delete(struct avl_tree *tree, struct avl_node *node) + { + struct avl_node *parent; + + if ((parent = node->parent) == NULL) + return; + + if (node == parent->left) + { + parent->balance++; + + if (parent->balance == 0) + { + post_delete(tree, parent); + return; + } + + if (parent->balance == 1) + return; + + if (parent->right->balance == 0) + { + rotate_left(tree, parent); + return; + } + + if (parent->right->balance == 1) + { + rotate_left(tree, parent); + post_delete(tree, parent->parent); + return; + } + + rotate_right(tree, parent->right); + rotate_left(tree, parent); + post_delete(tree, parent->parent); + return; + } + + parent->balance--; + + if (parent->balance == 0) + { + post_delete(tree, parent); + return; + } + + if (parent->balance == -1) + return; + + if (parent->left->balance == 0) + { + rotate_right(tree, parent); + return; + } + + if (parent->left->balance == -1) + { + rotate_right(tree, parent); + post_delete(tree, parent->parent); + return; + } + + rotate_left(tree, parent->left); + rotate_right(tree, parent); + post_delete(tree, parent->parent); + } + + static struct avl_node *local_min(struct avl_node *node) + { + if (node->left == NULL) + return node; + + return local_min(node->left); + } + + static void delete_worker(struct avl_tree *tree, struct avl_node *node) + { + struct avl_node *parent, *min; + + parent = node->parent; + + if (node->left == NULL && node->right == NULL) + { + if (parent == NULL) + { + tree->root = NULL; + return; + } + + if (parent->left == node) + { + parent->left = NULL; + parent->balance++; + + if (parent->balance == 1) + return; + + if (parent->balance == 0) + { + post_delete(tree, parent); + return; + } + + if (parent->right->balance == 0) + { + rotate_left(tree, parent); + return; + } + + if (parent->right->balance == 1) + { + rotate_left(tree, parent); + post_delete(tree, parent->parent); + return; + } + + rotate_right(tree, parent->right); + rotate_left(tree, parent); + post_delete(tree, parent->parent); + return; + } + + if (parent->right == node) + { + parent->right = NULL; + parent->balance--; + + if (parent->balance == -1) + return; + + if (parent->balance == 0) + { + post_delete(tree, parent); + return; + } + + if (parent->left->balance == 0) + { + rotate_right(tree, parent); + return; + } + + if (parent->left->balance == -1) + { + rotate_right(tree, parent); + post_delete(tree, parent->parent); + return; + } + + rotate_left(tree, parent->left); + rotate_right(tree, parent); + post_delete(tree, parent->parent); + return; + } + } + + if (node->left == NULL) + { + if (parent == NULL) + { + tree->root = node->right; + node->right->parent = NULL; + return; + } + + node->right->parent = parent; + + if (parent->left == node) + parent->left = node->right; + + else + parent->right = node->right; + + post_delete(tree, node->right); + return; + } + + if (node->right == NULL) + { + if (parent == NULL) + { + tree->root = node->left; + node->left->parent = NULL; + return; + } + + node->left->parent = parent; + + if (parent->left == node) + parent->left = node->left; + + else + parent->right = node->left; + + post_delete(tree, node->left); + return; + } + + min = local_min(node->right); + delete_worker(tree, min); + parent = node->parent; + + min->balance = node->balance; + min->parent = parent; + min->left = node->left; + min->right = node->right; + + if (min->left != NULL) + min->left->parent = min; + + if (min->right != NULL) + min->right->parent = min; + + if (parent == NULL) + { + tree->root = min; + return; + } + + if (parent->left == node) + { + parent->left = min; + return; + } + + parent->right = min; + } + + void avl_delete(struct avl_tree *tree, struct avl_node *node) + { + delete_worker(tree, node); + + node->balance = 0xdeadbeef; + + node->left = (struct avl_node *)0xdeadbeef; + node->right = (struct avl_node *)0xdeadbeef; + + node->key = (void *)0xdeadbeef; + + node->data = (void *)0xdeadbeef; + } + From (spam-protected) Mon Mar 26 17:33:47 2007 From: (spam-protected) (Thomas Lopatic) Date: Mon, 26 Mar 2007 15:33:47 +0000 Subject: [Olsr-cvs] olsrd-current/src/win32 ifnet.c, 1.32, 1.33 kernel_routes.c, 1.15, 1.16 Message-ID: Update of /cvsroot/olsrd/olsrd-current/src/win32 In directory sc8-pr-cvs3.sourceforge.net:/tmp/cvs-serv14916 Modified Files: ifnet.c kernel_routes.c Log Message: Vista fixes. Index: ifnet.c =================================================================== RCS file: /cvsroot/olsrd/olsrd-current/src/win32/ifnet.c,v retrieving revision 1.32 retrieving revision 1.33 diff -C2 -d -r1.32 -r1.33 *** ifnet.c 11 Oct 2006 20:58:45 -0000 1.32 --- ifnet.c 26 Mar 2007 15:33:44 -0000 1.33 *************** *** 55,62 **** --- 55,109 ---- #include + struct MibIpInterfaceRow + { + USHORT Family; + ULONG64 InterfaceLuid; + ULONG InterfaceIndex; + ULONG MaxReassemblySize; + ULONG64 InterfaceIdentifier; + ULONG MinRouterAdvertisementInterval; + ULONG MaxRouterAdvertisementInterval; + BOOLEAN AdvertisingEnabled; + BOOLEAN ForwardingEnabled; + BOOLEAN WeakHostSend; + BOOLEAN WeakHostReceive; + BOOLEAN UseAutomaticMetric; + BOOLEAN UseNeighborUnreachabilityDetection; + BOOLEAN ManagedAddressConfigurationSupported; + BOOLEAN OtherStatefulConfigurationSupported; + BOOLEAN AdvertiseDefaultRoute; + INT RouterDiscoveryBehavior; + ULONG DadTransmits; + ULONG BaseReachableTime; + ULONG RetransmitTime; + ULONG PathMtuDiscoveryTimeout; + INT LinkLocalAddressBehavior; + ULONG LinkLocalAddressTimeout; + ULONG ZoneIndices[16]; + ULONG SitePrefixLength; + ULONG Metric; + ULONG NlMtu; + BOOLEAN Connected; + BOOLEAN SupportsWakeUpPatterns; + BOOLEAN SupportsNeighborDiscovery; + BOOLEAN SupportsRouterDiscovery; + ULONG ReachableTime; + BYTE TransmitOffload; + BYTE ReceiveOffload; + BOOLEAN DisableDefaultRoutes; + }; + + typedef DWORD (__stdcall *GETIPINTERFACEENTRY) + (struct MibIpInterfaceRow *Row); + + typedef DWORD (__stdcall *GETADAPTERSADDRESSES) + (ULONG Family, DWORD Flags, PVOID Reserved, + PIP_ADAPTER_ADDRESSES pAdapterAddresses, PULONG pOutBufLen); + struct InterfaceInfo { unsigned int Index; int Mtu; + int Metric; unsigned int Addr; unsigned int Mask; *************** *** 135,143 **** static int FriendlyNameToMiniIndex(int *MiniIndex, char *String) { - typedef DWORD (*GETADAPTERSADDRESSES)(ULONG Family, - DWORD Flags, - PVOID Reserved, - PIP_ADAPTER_ADDRESSES pAdapterAddresses, - PULONG pOutBufLen); unsigned long BuffLen; unsigned long Res; --- 182,185 ---- *************** *** 203,206 **** --- 245,250 ---- int TabIdx; IP_ADAPTER_INFO AdInfo[MAX_INTERFACES], *Walker; + HMODULE Lib; + struct MibIpInterfaceRow Row; if (olsr_cnf->ip_version == AF_INET6) *************** *** 261,264 **** --- 305,349 ---- UDP_IPV6_HDRSIZE : UDP_IPV4_HDRSIZE; + Lib = LoadLibrary("iphlpapi.dll"); + + if (Lib == NULL) + { + fprintf(stderr, "Cannot load iphlpapi.dll: %08lx\n", GetLastError()); + return -1; + } + + GETIPINTERFACEENTRY InterfaceEntry = + (GETIPINTERFACEENTRY)GetProcAddress(Lib, "GetIpInterfaceEntry"); + + if (InterfaceEntry == NULL) + { + OLSR_PRINTF(5, "Not running on Vista - setting interface metric to 0.\n"); + + Info->Metric = 0; + } + + else + { + memset(&Row, 0, sizeof (struct MibIpInterfaceRow)); + + Row.Family = AF_INET; + Row.InterfaceIndex = Info->Index; + + Res = InterfaceEntry(&Row); + + if (Res != NO_ERROR) + { + fprintf(stderr, "GetIpInterfaceEntry() = %08lx", Res); + FreeLibrary(Lib); + return -1; + } + + Info->Metric = Row.Metric; + + OLSR_PRINTF(5, "Running on Vista - interface metric is %d.\n", Info->Metric); + } + + FreeLibrary(Lib); + BuffLen = sizeof (AdInfo); *************** *** 358,362 **** CloseHandle(DevHand); ! if (ErrNo == ERROR_GEN_FAILURE) { OLSR_PRINTF(5, "OID not supported. Device probably not wireless.\n") --- 443,447 ---- CloseHandle(DevHand); ! if (ErrNo == ERROR_GEN_FAILURE || ErrNo == ERROR_INVALID_PARAMETER) { OLSR_PRINTF(5, "OID not supported. Device probably not wireless.\n") *************** *** 740,744 **** else ! Int->int_metric = IsWlan; Res = 1; --- 825,829 ---- else ! Int->int_metric = Info.Metric; Res = 1; *************** *** 912,916 **** else ! New->int_metric = IsWlan; New->olsr_seqnum = random() & 0xffff; --- 997,1001 ---- else ! New->int_metric = Info.Metric; New->olsr_seqnum = random() & 0xffff; Index: kernel_routes.c =================================================================== RCS file: /cvsroot/olsrd/olsrd-current/src/win32/kernel_routes.c,v retrieving revision 1.15 retrieving revision 1.16 diff -C2 -d -r1.15 -r1.16 *** kernel_routes.c 27 Feb 2005 10:48:05 -0000 1.15 --- kernel_routes.c 26 Mar 2007 15:33:44 -0000 1.16 *************** *** 64,68 **** OLSR_PRINTF(1, "Adding IPv4 route with metric %d to %s/%s via %s and I/F 0x%x.\n", ! Dest->rt_metric, Str1, Str2, Str3, Dest->rt_if->if_index) memset(&Row, 0, sizeof (MIB_IPFORWARDROW)); --- 64,68 ---- OLSR_PRINTF(1, "Adding IPv4 route with metric %d to %s/%s via %s and I/F 0x%x.\n", ! Dest->rt_metric + Dest->rt_if->int_metric, Str1, Str2, Str3, Dest->rt_if->if_index) memset(&Row, 0, sizeof (MIB_IPFORWARDROW)); *************** *** 70,78 **** Row.dwForwardDest = Dest->rt_dst.v4; Row.dwForwardMask = Dest->rt_mask.v4; Row.dwForwardNextHop = Dest->rt_router.v4; Row.dwForwardIfIndex = Dest->rt_if->if_index; Row.dwForwardType = (Dest->rt_dst.v4 == Dest->rt_router.v4) ? 3 : 4; ! Row.dwForwardProto = 3; // PROTO_IP_NETMGMT ! Row.dwForwardMetric1 = Dest->rt_metric; Res = SetIpForwardEntry(&Row); --- 70,86 ---- Row.dwForwardDest = Dest->rt_dst.v4; Row.dwForwardMask = Dest->rt_mask.v4; + Row.dwForwardPolicy = 0; Row.dwForwardNextHop = Dest->rt_router.v4; Row.dwForwardIfIndex = Dest->rt_if->if_index; + // MIB_IPROUTE_TYPE_DIRECT and MIB_IPROUTE_TYPE_INDIRECT Row.dwForwardType = (Dest->rt_dst.v4 == Dest->rt_router.v4) ? 3 : 4; ! Row.dwForwardProto = 3; // MIB_IPPROTO_NETMGMT ! Row.dwForwardAge = INFINITE; ! Row.dwForwardNextHopAS = 0; ! Row.dwForwardMetric1 = Dest->rt_metric + Dest->rt_if->int_metric; ! Row.dwForwardMetric2 = -1; ! Row.dwForwardMetric3 = -1; ! Row.dwForwardMetric4 = -1; ! Row.dwForwardMetric5 = -1; Res = SetIpForwardEntry(&Row); *************** *** 120,124 **** OLSR_PRINTF(1, "Deleting IPv4 route with metric %d to %s/%s via %s and I/F 0x%x.\n", ! Dest->rt_metric, Str1, Str2, Str3, Dest->rt_if->if_index) memset(&Row, 0, sizeof (MIB_IPFORWARDROW)); --- 128,132 ---- OLSR_PRINTF(1, "Deleting IPv4 route with metric %d to %s/%s via %s and I/F 0x%x.\n", ! Dest->rt_metric + Dest->rt_if->int_metric, Str1, Str2, Str3, Dest->rt_if->if_index) memset(&Row, 0, sizeof (MIB_IPFORWARDROW)); *************** *** 126,134 **** Row.dwForwardDest = Dest->rt_dst.v4; Row.dwForwardMask = Dest->rt_mask.v4; Row.dwForwardNextHop = Dest->rt_router.v4; Row.dwForwardIfIndex = Dest->rt_if->if_index; Row.dwForwardType = (Dest->rt_dst.v4 == Dest->rt_router.v4) ? 3 : 4; ! Row.dwForwardProto = 3; // PROTO_IP_NETMGMT ! Row.dwForwardMetric1 = Dest->rt_metric; Res = DeleteIpForwardEntry(&Row); --- 134,150 ---- Row.dwForwardDest = Dest->rt_dst.v4; Row.dwForwardMask = Dest->rt_mask.v4; + Row.dwForwardPolicy = 0; Row.dwForwardNextHop = Dest->rt_router.v4; Row.dwForwardIfIndex = Dest->rt_if->if_index; + // MIB_IPROUTE_TYPE_DIRECT and MIB_IPROUTE_TYPE_INDIRECT Row.dwForwardType = (Dest->rt_dst.v4 == Dest->rt_router.v4) ? 3 : 4; ! Row.dwForwardProto = 3; // MIB_IPPROTO_NETMGMT ! Row.dwForwardAge = INFINITE; ! Row.dwForwardNextHopAS = 0; ! Row.dwForwardMetric1 = Dest->rt_metric + Dest->rt_if->int_metric; ! Row.dwForwardMetric2 = -1; ! Row.dwForwardMetric3 = -1; ! Row.dwForwardMetric4 = -1; ! Row.dwForwardMetric5 = -1; Res = DeleteIpForwardEntry(&Row); From (spam-protected) Mon Mar 26 17:33:34 2007 From: (spam-protected) (Thomas Lopatic) Date: Mon, 26 Mar 2007 15:33:34 +0000 Subject: [Olsr-cvs] olsrd-current/make Makefile.win32,1.7,1.8 Message-ID: Update of /cvsroot/olsrd/olsrd-current/make In directory sc8-pr-cvs3.sourceforge.net:/tmp/cvs-serv14896 Modified Files: Makefile.win32 Log Message: Vista fixes. Index: Makefile.win32 =================================================================== RCS file: /cvsroot/olsrd/olsrd-current/make/Makefile.win32,v retrieving revision 1.7 retrieving revision 1.8 diff -C2 -d -r1.7 -r1.8 *** Makefile.win32 12 Nov 2006 21:54:53 -0000 1.7 --- Makefile.win32 26 Mar 2007 15:33:32 -0000 1.8 *************** *** 9,13 **** HDRS += $(wildcard src/win32/*.h) ! DEFINES += -DWIN32 -D_WIN32_WINNT=0x0501 LIBS += -mno-cygwin -lws2_32 -liphlpapi INCLUDES += -I$(TOPDIR)/src/win32 --- 9,13 ---- HDRS += $(wildcard src/win32/*.h) ! DEFINES += -DWIN32 -D_WIN32_WINNT=0x0600 LIBS += -mno-cygwin -lws2_32 -liphlpapi INCLUDES += -I$(TOPDIR)/src/win32 From (spam-protected) Tue Mar 27 02:45:18 2007 From: (spam-protected) (Thomas Lopatic) Date: Tue, 27 Mar 2007 00:45:18 +0000 Subject: [Olsr-cvs] olsrd-current/src lq_avl.c,1.4,1.5 lq_avl.h,1.5,1.6 Message-ID: Update of /cvsroot/olsrd/olsrd-current/src In directory sc8-pr-cvs3.sourceforge.net:/tmp/cvs-serv7080/src Modified Files: lq_avl.c lq_avl.h Log Message: AVL tree walk functions. Index: lq_avl.h =================================================================== RCS file: /cvsroot/olsrd/olsrd-current/src/lq_avl.h,v retrieving revision 1.5 retrieving revision 1.6 diff -C2 -d -r1.5 -r1.6 *** lq_avl.h 25 Mar 2007 23:19:44 -0000 1.5 --- lq_avl.h 27 Mar 2007 00:45:15 -0000 1.6 *************** *** 50,53 **** --- 50,54 ---- struct avl_node *left; struct avl_node *right; + struct avl_node *next; void *key; void *data; *************** *** 64,67 **** --- 65,70 ---- int avl_insert(struct avl_tree *, struct avl_node *); void avl_delete(struct avl_tree *, struct avl_node *); + struct avl_node *avl_walk_init(struct avl_tree *); + struct avl_node *avl_walk_next(struct avl_node *); #define inline_avl_comp_ipv4(ip1, ip2) \ Index: lq_avl.c =================================================================== RCS file: /cvsroot/olsrd/olsrd-current/src/lq_avl.c,v retrieving revision 1.4 retrieving revision 1.5 diff -C2 -d -r1.4 -r1.5 *** lq_avl.c 25 Mar 2007 23:19:44 -0000 1.4 --- lq_avl.c 27 Mar 2007 00:45:15 -0000 1.5 *************** *** 55,81 **** } ! static struct avl_node *avl_find_rec_ipv4(struct avl_node *node, void *key) { ! if (*(unsigned int *)key < *(unsigned int *)node->key) { ! if (node->left != NULL) { ! return avl_find_rec_ipv4(node->left, key); ! } } ! else if (*(unsigned int *)key > *(unsigned int *)node->key) { ! if (node->right != NULL) { ! return avl_find_rec_ipv4(node->right, key); ! } } return node; } ! static struct avl_node *avl_find_rec(struct avl_node *node, void *key, ! int (*comp)(void *, void *)) { int diff; ! if (0 == comp) { ! return avl_find_rec_ipv4(node, key); ! } diff = (*comp)(key, node->key); --- 55,82 ---- } ! static struct avl_node *find_rec_ipv4(struct avl_node *node, void *key) { ! if (*(unsigned int *)key < *(unsigned int *)node->key) ! { ! if (node->left != NULL) ! return find_rec_ipv4(node->left, key); } ! ! else if (*(unsigned int *)key > *(unsigned int *)node->key) ! { ! if (node->right != NULL) ! return find_rec_ipv4(node->right, key); } + return node; } ! static struct avl_node *find_rec(struct avl_node *node, void *key, ! int (*comp)(void *, void *)) { int diff; ! if (0 == comp) ! return find_rec_ipv4(node, key); diff = (*comp)(key, node->key); *************** *** 84,88 **** { if (node->left != NULL) ! return avl_find_rec(node->left, key, comp); return node; --- 85,89 ---- { if (node->left != NULL) ! return find_rec(node->left, key, comp); return node; *************** *** 92,96 **** { if (node->right != NULL) ! return avl_find_rec(node->right, key, comp); return node; --- 93,97 ---- { if (node->right != NULL) ! return find_rec(node->right, key, comp); return node; *************** *** 107,117 **** return NULL; ! node = avl_find_rec(tree->root, key, tree->comp); ! if (0 == tree->comp) { if (0 != inline_avl_comp_ipv4(node->key, key)) return NULL; } ! else { if ((*tree->comp)(node->key, key) != 0) return NULL; --- 108,121 ---- return NULL; ! node = find_rec(tree->root, key, tree->comp); ! if (0 == tree->comp) ! { if (0 != inline_avl_comp_ipv4(node->key, key)) return NULL; } ! ! else ! { if ((*tree->comp)(node->key, key) != 0) return NULL; *************** *** 254,268 **** } ! node = avl_find_rec(tree->root, new->key, tree->comp); if (0 == tree->comp) - { diff = inline_avl_comp_ipv4(new->key, node->key); - } else - { diff = (*tree->comp)(new->key, node->key); - } if (diff == 0) --- 258,268 ---- } ! node = find_rec(tree->root, new->key, tree->comp); if (0 == tree->comp) diff = inline_avl_comp_ipv4(new->key, node->key); else diff = (*tree->comp)(new->key, node->key); if (diff == 0) *************** *** 544,545 **** --- 544,580 ---- } + static struct avl_node *walk_init_rec(struct avl_node *node, struct avl_node *tail) + { + if (node == NULL) + return tail; + + tail = walk_init_rec(node->left, tail); + + node->next = NULL; + + if (tail != NULL) + tail->next = node; + + tail = node; + + tail = walk_init_rec(node->right, tail); + + return tail; + } + + struct avl_node *avl_walk_init(struct avl_tree *tree) + { + struct avl_node *node = tree->root; + + if (node == NULL) + return NULL; + + walk_init_rec(node, NULL); + + return local_min(node); + } + + struct avl_node *avl_walk_next(struct avl_node *node) + { + return node->next; + } From (spam-protected) Tue Mar 27 05:01:15 2007 From: (spam-protected) (Thomas Lopatic) Date: Tue, 27 Mar 2007 03:01:15 +0000 Subject: [Olsr-cvs] olsrd-current/gui/win32 Switch.sln, NONE, 1.1 Frontend.dsw, 1.1, NONE Frontend.ncb, 1.21, NONE Frontend.opt, 1.21, NONE Message-ID: Update of /cvsroot/olsrd/olsrd-current/gui/win32 In directory sc8-pr-cvs3.sourceforge.net:/tmp/cvs-serv27684 Added Files: Switch.sln Removed Files: Frontend.dsw Frontend.ncb Frontend.opt Log Message: Use Visual Studio .NET 2005. --- Frontend.opt DELETED --- --- Frontend.dsw DELETED --- --- NEW FILE: Switch.sln --- (This appears to be a binary file; contents omitted.) --- Frontend.ncb DELETED --- From (spam-protected) Tue Mar 27 05:01:10 2007 From: (spam-protected) (Thomas Lopatic) Date: Tue, 27 Mar 2007 03:01:10 +0000 Subject: [Olsr-cvs] olsrd-current/gui/win32/Main/res Frontend.rc2,1.1,1.2 Message-ID: Update of /cvsroot/olsrd/olsrd-current/gui/win32/Main/res In directory sc8-pr-cvs3.sourceforge.net:/tmp/cvs-serv27684/Main/res Modified Files: Frontend.rc2 Log Message: Use Visual Studio .NET 2005. Index: Frontend.rc2 =================================================================== RCS file: /cvsroot/olsrd/olsrd-current/gui/win32/Main/res/Frontend.rc2,v retrieving revision 1.1 retrieving revision 1.2 diff -C2 -d -r1.1 -r1.2 *** Frontend.rc2 13 Sep 2004 16:42:41 -0000 1.1 --- Frontend.rc2 27 Mar 2007 03:01:08 -0000 1.2 *************** *** 1,13 **** ! // ! // FRONTEND.RC2 - resources Microsoft Visual C++ does not edit directly ! // ! ! #ifdef APSTUDIO_INVOKED ! #error this file is not editable by Microsoft Visual C++ ! #endif //APSTUDIO_INVOKED ! ! ! ///////////////////////////////////////////////////////////////////////////// ! // Add manually edited resources here... ! ! ///////////////////////////////////////////////////////////////////////////// --- 1,13 ---- ! // ! // FRONTEND.RC2 - resources Microsoft Visual C++ does not edit directly ! // ! ! #ifdef APSTUDIO_INVOKED ! #error this file is not editable by Microsoft Visual C++ ! #endif //APSTUDIO_INVOKED ! ! ! ///////////////////////////////////////////////////////////////////////////// ! // Add manually edited resources here... ! ! ///////////////////////////////////////////////////////////////////////////// From (spam-protected) Tue Mar 27 05:01:11 2007 From: (spam-protected) (Thomas Lopatic) Date: Tue, 27 Mar 2007 03:01:11 +0000 Subject: [Olsr-cvs] olsrd-current/gui/win32/Shim Shim.vcproj, NONE, 1.1 shim.c, 1.4, 1.5 Shim.dsp, 1.1, NONE Message-ID: Update of /cvsroot/olsrd/olsrd-current/gui/win32/Shim In directory sc8-pr-cvs3.sourceforge.net:/tmp/cvs-serv27684/Shim Modified Files: shim.c Added Files: Shim.vcproj Removed Files: Shim.dsp Log Message: Use Visual Studio .NET 2005. --- Shim.dsp DELETED --- Index: shim.c =================================================================== RCS file: /cvsroot/olsrd/olsrd-current/gui/win32/Shim/shim.c,v retrieving revision 1.4 retrieving revision 1.5 diff -C2 -d -r1.4 -r1.5 *** shim.c 21 Nov 2004 01:21:10 -0000 1.4 --- shim.c 27 Mar 2007 03:01:08 -0000 1.5 *************** *** 1,134 **** ! /* ! * The olsr.org Optimized Link-State Routing daemon (olsrd) ! * Copyright (c) 2004, Thomas Lopatic (thomas at lopatic.de) ! * All rights reserved. ! * ! * Redistribution and use in source and binary forms, with or without ! * modification, are permitted provided that the following conditions ! * are met: ! * ! * * Redistributions of source code must retain the above copyright ! * notice, this list of conditions and the following disclaimer. ! * * Redistributions in binary form must reproduce the above copyright ! * notice, this list of conditions and the following disclaimer in ! * the documentation and/or other materials provided with the ! * distribution. ! * * Neither the name of olsr.org, olsrd nor the names of its ! * contributors may be used to endorse or promote products derived ! * from this software without specific prior written permission. ! * ! * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS ! * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT ! * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS ! * FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE ! * COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, ! * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, ! * BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; ! * LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER ! * CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT ! * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ! * ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE ! * POSSIBILITY OF SUCH DAMAGE. ! * ! * Visit http://www.olsr.org for more information. ! * ! * If you find this software useful feel free to make a donation ! * to the project. For more information see the website or contact ! * the copyright holders. ! * ! * $Id$ ! */ ! ! #include ! ! void EntryPoint(void) ! { ! STARTUPINFO StartInfo; ! PROCESS_INFORMATION ProcInfo; ! int i; ! char *CmdLine; ! char *Walker; ! char NewCmdLine[MAX_PATH + 500]; ! HANDLE Handles[2]; ! unsigned long Res; ! int Quotes; ! ! Handles[0] = OpenEvent(EVENT_ALL_ACCESS, FALSE, "TheOlsrdShimEvent"); ! ! if (Handles[0] == NULL) ! { ! MessageBox(NULL, "Cannot open event.", "Shim Error", MB_ICONERROR | MB_OK); ! ExitProcess(1); ! } ! ! CmdLine = GetCommandLine(); ! ! Quotes = 0; ! ! while (*CmdLine != 0) ! { ! if (*CmdLine == '"') ! Quotes = !Quotes; ! ! else if (*CmdLine == ' ' && !Quotes) ! break; ! ! CmdLine++; ! } ! ! if (*CmdLine == 0) ! { ! MessageBox(NULL, "Missing arguments.", "Shim Error", MB_ICONERROR | MB_OK); ! ExitProcess(1); ! } ! ! GetModuleFileName(NULL, NewCmdLine, MAX_PATH); ! ! for (Walker = NewCmdLine; *Walker != 0; Walker++); ! ! while (*Walker != '\\') ! Walker--; ! ! Walker[1] = 'o'; ! Walker[2] = 'l'; ! Walker[3] = 's'; ! Walker[4] = 'r'; ! Walker[5] = 'd'; ! Walker[6] = '.'; ! Walker[7] = 'e'; ! Walker[8] = 'x'; ! Walker[9] = 'e'; ! ! Walker[10] = ' '; ! ! Walker += 11; ! ! while ((*Walker++ = *CmdLine++) != 0); ! ! for (i = 0; i < sizeof (STARTUPINFO); i++) ! ((char *)&StartInfo)[i] = 0; ! ! StartInfo.cb = sizeof (STARTUPINFO); ! ! if (!CreateProcess(NULL, NewCmdLine, NULL, NULL, TRUE, ! CREATE_NEW_PROCESS_GROUP, NULL, NULL, &StartInfo, &ProcInfo)) ! { ! MessageBox(NULL, "Cannot execute OLSR server.", "Shim Error", MB_ICONERROR | MB_OK); ! ExitProcess(1); ! } ! ! Handles[1] = ProcInfo.hProcess; ! ! Res = WaitForMultipleObjects(2, Handles, FALSE, INFINITE); ! ! if (Res == WAIT_OBJECT_0) ! { ! GenerateConsoleCtrlEvent(CTRL_BREAK_EVENT, ProcInfo.dwProcessId); ! WaitForSingleObject(ProcInfo.hProcess, INFINITE); ! } ! ! CloseHandle(ProcInfo.hThread); ! CloseHandle(ProcInfo.hProcess); ! ! ExitProcess(0); ! } --- 1,134 ---- ! /* ! * The olsr.org Optimized Link-State Routing daemon (olsrd) ! * Copyright (c) 2004, Thomas Lopatic (thomas at lopatic.de) ! * All rights reserved. ! * ! * Redistribution and use in source and binary forms, with or without ! * modification, are permitted provided that the following conditions ! * are met: ! * ! * * Redistributions of source code must retain the above copyright ! * notice, this list of conditions and the following disclaimer. ! * * Redistributions in binary form must reproduce the above copyright ! * notice, this list of conditions and the following disclaimer in ! * the documentation and/or other materials provided with the ! * distribution. ! * * Neither the name of olsr.org, olsrd nor the names of its ! * contributors may be used to endorse or promote products derived ! * from this software without specific prior written permission. ! * ! * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS ! * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT ! * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS ! * FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE ! * COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, ! * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, ! * BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; ! * LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER ! * CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT ! * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ! * ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE ! * POSSIBILITY OF SUCH DAMAGE. ! * ! * Visit http://www.olsr.org for more information. ! * ! * If you find this software useful feel free to make a donation ! * to the project. For more information see the website or contact ! * the copyright holders. ! * ! * $Id$ ! */ ! ! #include ! ! void EntryPoint(void) ! { ! STARTUPINFO StartInfo; ! PROCESS_INFORMATION ProcInfo; ! int i; ! char *CmdLine; ! char *Walker; ! char NewCmdLine[MAX_PATH + 500]; ! HANDLE Handles[2]; ! unsigned long Res; ! int Quotes; ! ! Handles[0] = OpenEvent(EVENT_ALL_ACCESS, FALSE, "TheOlsrdShimEvent"); ! ! if (Handles[0] == NULL) ! { ! MessageBox(NULL, "Cannot open event.", "Shim Error", MB_ICONERROR | MB_OK); ! ExitProcess(1); ! } ! ! CmdLine = GetCommandLine(); ! ! Quotes = 0; ! ! while (*CmdLine != 0) ! { ! if (*CmdLine == '"') ! Quotes = !Quotes; ! ! else if (*CmdLine == ' ' && !Quotes) ! break; ! ! CmdLine++; ! } ! ! if (*CmdLine == 0) ! { ! MessageBox(NULL, "Missing arguments.", "Shim Error", MB_ICONERROR | MB_OK); ! ExitProcess(1); ! } ! ! GetModuleFileName(NULL, NewCmdLine, MAX_PATH); ! ! for (Walker = NewCmdLine; *Walker != 0; Walker++); ! ! while (*Walker != '\\') ! Walker--; ! ! Walker[1] = 'o'; ! Walker[2] = 'l'; ! Walker[3] = 's'; ! Walker[4] = 'r'; ! Walker[5] = 'd'; ! Walker[6] = '.'; ! Walker[7] = 'e'; ! Walker[8] = 'x'; ! Walker[9] = 'e'; ! ! Walker[10] = ' '; ! ! Walker += 11; ! ! while ((*Walker++ = *CmdLine++) != 0); ! ! for (i = 0; i < sizeof (STARTUPINFO); i++) ! ((char *)&StartInfo)[i] = 0; ! ! StartInfo.cb = sizeof (STARTUPINFO); ! ! if (!CreateProcess(NULL, NewCmdLine, NULL, NULL, TRUE, ! CREATE_NEW_PROCESS_GROUP, NULL, NULL, &StartInfo, &ProcInfo)) ! { ! MessageBox(NULL, "Cannot execute OLSR server.", "Shim Error", MB_ICONERROR | MB_OK); ! ExitProcess(1); ! } ! ! Handles[1] = ProcInfo.hProcess; ! ! Res = WaitForMultipleObjects(2, Handles, FALSE, INFINITE); ! ! if (Res == WAIT_OBJECT_0) ! { ! GenerateConsoleCtrlEvent(CTRL_BREAK_EVENT, ProcInfo.dwProcessId); ! WaitForSingleObject(ProcInfo.hProcess, INFINITE); ! } ! ! CloseHandle(ProcInfo.hThread); ! CloseHandle(ProcInfo.hProcess); ! ! ExitProcess(0); ! } --- NEW FILE: Shim.vcproj --- From (spam-protected) Tue Mar 27 05:02:46 2007 From: (spam-protected) (Thomas Lopatic) Date: Tue, 27 Mar 2007 03:02:46 +0000 Subject: [Olsr-cvs] olsrd-current/gui/win32/Inst installer.nsi,1.14,1.15 Message-ID: Update of /cvsroot/olsrd/olsrd-current/gui/win32/Inst In directory sc8-pr-cvs3.sourceforge.net:/tmp/cvs-serv28504 Modified Files: installer.nsi Log Message: Version 0.5.0. Index: installer.nsi =================================================================== RCS file: /cvsroot/olsrd/olsrd-current/gui/win32/Inst/installer.nsi,v retrieving revision 1.14 retrieving revision 1.15 diff -C2 -d -r1.14 -r1.15 *** installer.nsi 29 Dec 2005 21:26:31 -0000 1.14 --- installer.nsi 27 Mar 2007 03:02:44 -0000 1.15 *************** *** 56,60 **** Function .onInit ! MessageBox MB_YESNO "This will install olsr.org 0.4.10 on your computer. Continue?" IDYES NoAbort Abort NoAbort: --- 56,60 ---- Function .onInit ! MessageBox MB_YESNO "This will install olsr.org 0.5.0 on your computer. Continue?" IDYES NoAbort Abort NoAbort: From (spam-protected) Tue Mar 27 05:05:23 2007 From: (spam-protected) (Thomas Lopatic) Date: Tue, 27 Mar 2007 03:05:23 +0000 Subject: [Olsr-cvs] olsrd-current/src/cfgparser Makefile, 1.21, 1.22 cfgfile_gen.c, 1.5, 1.6 Message-ID: Update of /cvsroot/olsrd/olsrd-current/src/cfgparser In directory sc8-pr-cvs3.sourceforge.net:/tmp/cvs-serv29662 Modified Files: Makefile cfgfile_gen.c Log Message: Write fish eye parameter to configuration file. Generate import library. Index: Makefile =================================================================== RCS file: /cvsroot/olsrd/olsrd-current/src/cfgparser/Makefile,v retrieving revision 1.21 retrieving revision 1.22 diff -C2 -d -r1.21 -r1.22 *** Makefile 29 Dec 2005 19:48:43 -0000 1.21 --- Makefile 27 Mar 2007 03:05:21 -0000 1.22 *************** *** 70,78 **** ifeq (${OS}, osx) ! LDFLAGS += -dynamiclib -single_module else LDFLAGS += -shared -Wl,-soname,$(LIBNAME) endif CFLAGS += -DMAKELIB NAME = $(LIBNAME) --- 70,82 ---- ifeq (${OS}, osx) ! LDFLAGS += -dynamiclib -single_module else LDFLAGS += -shared -Wl,-soname,$(LIBNAME) endif + ifeq (${OS}, win32) + LDFLAGS += -Wl,--out-implib=libolsrd_cfgparser.a -Wl,--export-all-symbols + endif + CFLAGS += -DMAKELIB NAME = $(LIBNAME) Index: cfgfile_gen.c =================================================================== RCS file: /cvsroot/olsrd/olsrd-current/src/cfgparser/cfgfile_gen.c,v retrieving revision 1.5 retrieving revision 1.6 diff -C2 -d -r1.5 -r1.6 *** cfgfile_gen.c 4 Feb 2007 22:37:36 -0000 1.5 --- cfgfile_gen.c 27 Mar 2007 03:05:21 -0000 1.6 *************** *** 195,198 **** --- 195,201 ---- fprintf(fd, "LinkQualityLevel\t%d\n\n", cnf->lq_level); + fprintf(fd, "# Fish Eye algorithm\n# 0 = do not use fish eye\n# 1 = use fish eye\n\n"); + fprintf(fd, "LinkQualityFishEye\t%d\n\n", cnf->lq_fish); + fprintf(fd, "# Link quality window size\n\n"); fprintf(fd, "LinkQualityWinSize\t%d\n\n", cnf->lq_wsize); From (spam-protected) Tue Mar 27 05:58:34 2007 From: (spam-protected) (Thomas Lopatic) Date: Tue, 27 Mar 2007 03:58:34 +0000 Subject: [Olsr-cvs] olsrd-current/gui/win32/Inst installer.nsi,1.15,1.16 Message-ID: Update of /cvsroot/olsrd/olsrd-current/gui/win32/Inst In directory sc8-pr-cvs3.sourceforge.net:/tmp/cvs-serv18262 Modified Files: installer.nsi Log Message: Removed name service plugin from Windows version. Need regex first. Index: installer.nsi =================================================================== RCS file: /cvsroot/olsrd/olsrd-current/gui/win32/Inst/installer.nsi,v retrieving revision 1.15 retrieving revision 1.16 diff -C2 -d -r1.15 -r1.16 *** installer.nsi 27 Mar 2007 03:02:44 -0000 1.15 --- installer.nsi 27 Mar 2007 03:58:31 -0000 1.16 *************** *** 70,75 **** SetOutPath $INSTDIR ! File ..\Main\Release\Switch.exe ! File ..\Shim\Release\Shim.exe File ..\..\..\olsrd.exe File ..\..\..\olsr_switch.exe --- 70,75 ---- SetOutPath $INSTDIR ! File /oname=Switch.exe ..\release\Main.exe ! File ..\release\Shim.exe File ..\..\..\olsrd.exe File ..\..\..\olsr_switch.exe *************** *** 83,87 **** File /oname=olsrd.conf.lq ..\..\..\files\olsrd.conf.win32.lq File ..\..\..\lib\dot_draw\olsrd_dot_draw.dll - File ..\..\..\lib\nameservice\olsrd_nameservice.dll File ..\..\..\lib\httpinfo\olsrd_httpinfo.dll --- 83,86 ---- From (spam-protected) Tue Mar 27 05:58:49 2007 From: (spam-protected) (Thomas Lopatic) Date: Tue, 27 Mar 2007 03:58:49 +0000 Subject: [Olsr-cvs] olsrd-current/make Makefile.win32,1.8,1.9 Message-ID: Update of /cvsroot/olsrd/olsrd-current/make In directory sc8-pr-cvs3.sourceforge.net:/tmp/cvs-serv18287 Modified Files: Makefile.win32 Log Message: Removed name service plugin from Windows version. Need regex first. Index: Makefile.win32 =================================================================== RCS file: /cvsroot/olsrd/olsrd-current/make/Makefile.win32,v retrieving revision 1.8 retrieving revision 1.9 diff -C2 -d -r1.8 -r1.9 *** Makefile.win32 26 Mar 2007 15:33:32 -0000 1.8 --- Makefile.win32 27 Mar 2007 03:58:47 -0000 1.9 *************** *** 26,31 **** OS_LIB_DYNLOAD = ! olsr-$(VERS).zip: gui/win32/Main/Release/Switch.exe \ ! gui/win32/Shim/Release/Shim.exe \ olsrd.exe \ olsr_switch.exe \ --- 26,31 ---- OS_LIB_DYNLOAD = ! olsr-$(VERS).zip: gui/win32/release/Main.exe \ ! gui/win32/release/Shim.exe \ olsrd.exe \ olsr_switch.exe \ *************** *** 41,45 **** gui/win32/Main/LQ-Default.olsr \ lib/dot_draw/olsrd_dot_draw.dll \ - lib/nameservice/olsrd_nameservice.dll \ lib/httpinfo/olsrd_httpinfo.dll $(STRIP) olsrd.exe --- 41,44 ---- *************** *** 47,51 **** $(STRIP) src/cfgparser/olsrd_cfgparser.dll $(STRIP) lib/dot_draw/olsrd_dot_draw.dll - $(STRIP) lib/nameservice/olsrd_nameservice.dll $(STRIP) lib/httpinfo/olsrd_httpinfo.dll rm -rf $(TEMP)/olsr-$(VERS) --- 46,49 ---- *************** *** 53,58 **** rm -f olsr-$(VERS).zip mkdir $(TEMP)/olsr-$(VERS) ! cp gui/win32/Main/Release/Switch.exe $(TEMP)/olsr-$(VERS) ! cp gui/win32/Shim/Release/Shim.exe $(TEMP)/olsr-$(VERS) cp olsrd.exe $(TEMP)/olsr-$(VERS) cp olsr_switch.exe $(TEMP)/olsr-$(VERS) --- 51,56 ---- rm -f olsr-$(VERS).zip mkdir $(TEMP)/olsr-$(VERS) ! cp gui/win32/release/Main.exe $(TEMP)/olsr-$(VERS)/Switch.exe ! cp gui/win32/release/Shim.exe $(TEMP)/olsr-$(VERS) cp olsrd.exe $(TEMP)/olsr-$(VERS) cp olsr_switch.exe $(TEMP)/olsr-$(VERS) *************** *** 68,81 **** cp gui/win32/Main/LQ-Default.olsr $(TEMP)/olsr-$(VERS)/Default.olsr cp lib/dot_draw/olsrd_dot_draw.dll $(TEMP)/olsr-$(VERS) - cp lib/nameservice/olsrd_nameservice.dll $(TEMP)/olsr-$(VERS) cp lib/httpinfo/olsrd_httpinfo.dll $(TEMP)/olsr-$(VERS) ! cd $(TEMP); echo y | cacls olsr-$(VERS) /T /G Everyone:F ! cd $(TEMP); zip -q -r olsr-$(VERS).zip olsr-$(VERS) cp $(TEMP)/olsr-$(VERS).zip . rm -rf $(TEMP)/olsr-$(VERS) rm -f $(TEMP)/olsr-$(VERS).zip ! olsr-$(VERS)-setup.exe: gui/win32/Main/Release/Switch.exe \ ! gui/win32/Shim/Release/Shim.exe \ olsrd.exe \ olsr_switch.exe \ --- 66,78 ---- cp gui/win32/Main/LQ-Default.olsr $(TEMP)/olsr-$(VERS)/Default.olsr cp lib/dot_draw/olsrd_dot_draw.dll $(TEMP)/olsr-$(VERS) cp lib/httpinfo/olsrd_httpinfo.dll $(TEMP)/olsr-$(VERS) ! echo y | cacls $(TEMP)\olsr-$(VERS) /T /G Everyone:F ! cd "$(TEMP)"; zip -q -r olsr-$(VERS).zip olsr-$(VERS) cp $(TEMP)/olsr-$(VERS).zip . rm -rf $(TEMP)/olsr-$(VERS) rm -f $(TEMP)/olsr-$(VERS).zip ! olsr-$(VERS)-setup.exe: gui/win32/release/Main.exe \ ! gui/win32/release/Shim.exe \ olsrd.exe \ olsr_switch.exe \ *************** *** 91,95 **** gui/win32/Main/LQ-Default.olsr \ lib/dot_draw/olsrd_dot_draw.dll \ - lib/nameservice/olsrd_nameservice.dll \ lib/httpinfo/olsrd_httpinfo.dll \ gui/win32/Inst/installer.nsi --- 88,91 ---- From (spam-protected) Tue Mar 27 05:59:29 2007 From: (spam-protected) (Thomas Lopatic) Date: Tue, 27 Mar 2007 03:59:29 +0000 Subject: [Olsr-cvs] olsrd-current/lib/txtinfo/src olsrd_txtinfo.c,1.1,1.2 Message-ID: Update of /cvsroot/olsrd/olsrd-current/lib/txtinfo/src In directory sc8-pr-cvs3.sourceforge.net:/tmp/cvs-serv18679 Modified Files: olsrd_txtinfo.c Log Message: Fixed Windows port. Index: olsrd_txtinfo.c =================================================================== RCS file: /cvsroot/olsrd/olsrd-current/lib/txtinfo/src/olsrd_txtinfo.c,v retrieving revision 1.1 retrieving revision 1.2 diff -C2 -d -r1.1 -r1.2 *** olsrd_txtinfo.c 31 Jan 2007 12:38:26 -0000 1.1 --- olsrd_txtinfo.c 27 Mar 2007 03:59:27 -0000 1.2 *************** *** 51,55 **** --- 51,57 ---- #include #include + #if !defined WIN32 #include + #endif #include #include From (spam-protected) Tue Mar 27 05:01:10 2007 From: (spam-protected) (Thomas Lopatic) Date: Tue, 27 Mar 2007 03:01:10 +0000 Subject: [Olsr-cvs] olsrd-current/gui/win32/Main Main.vcproj, NONE, 1.1 Frontend.cpp, 1.7, 1.8 Frontend.h, 1.5, 1.6 Frontend.rc, 1.7, 1.8 FrontendDlg.cpp, 1.10, 1.11 FrontendDlg.h, 1.6, 1.7 HnaEntry.cpp, 1.3, 1.4 HnaEntry.h, 1.3, 1.4 Ipc.h, 1.5, 1.6 LQ-Default.olsr, 1.1, 1.2 MidEntry.cpp, 1.3, 1.4 MidEntry.h, 1.3, 1.4 MprEntry.cpp, 1.3, 1.4 MprEntry.h, 1.3, 1.4 MyDialog1.cpp, 1.6, 1.7 MyDialog1.h, 1.5, 1.6 MyDialog2.cpp, 1.8, 1.9 MyDialog2.h, 1.8, 1.9 MyDialog3.cpp, 1.4, 1.5 MyDialog3.h, 1.3, 1.4 MyDialog4.cpp, 1.3, 1.4 MyDialog4.h, 1.3, 1.4 MyEdit.cpp, 1.3, 1.4 MyEdit.h, 1.3, 1.4 MyTabCtrl.cpp, 1.4, 1.5 MyTabCtrl.h, 1.5, 1.6 NodeEntry.cpp, 1.3, 1.4 NodeEntry.h, 1.3, 1.4 RFC-Default.olsr, 1.1, 1.2 StdAfx.cpp, 1.3, 1.4 StdAfx.h, 1.3, 1.4 TrayIcon.cpp, 1.3, 1.4 TrayIcon.h, 1.1, 1.2 resource.h, 1.6, 1.7 Frontend.clw, 1.8, NONE Frontend.dsp, 1.5, NONE Switch.exe.manifest, 1.1, NONE Message-ID: Update of /cvsroot/olsrd/olsrd-current/gui/win32/Main In directory sc8-pr-cvs3.sourceforge.net:/tmp/cvs-serv27684/Main Modified Files: Frontend.cpp Frontend.h Frontend.rc FrontendDlg.cpp FrontendDlg.h HnaEntry.cpp HnaEntry.h Ipc.h LQ-Default.olsr MidEntry.cpp MidEntry.h MprEntry.cpp MprEntry.h MyDialog1.cpp MyDialog1.h MyDialog2.cpp MyDialog2.h MyDialog3.cpp MyDialog3.h MyDialog4.cpp MyDialog4.h MyEdit.cpp MyEdit.h MyTabCtrl.cpp MyTabCtrl.h NodeEntry.cpp NodeEntry.h RFC-Default.olsr StdAfx.cpp StdAfx.h TrayIcon.cpp TrayIcon.h resource.h Added Files: Main.vcproj Removed Files: Frontend.clw Frontend.dsp Switch.exe.manifest Log Message: Use Visual Studio .NET 2005. Index: Frontend.cpp =================================================================== RCS file: /cvsroot/olsrd/olsrd-current/gui/win32/Main/Frontend.cpp,v retrieving revision 1.7 retrieving revision 1.8 diff -C2 -d -r1.7 -r1.8 *** Frontend.cpp 17 Jan 2005 11:52:35 -0000 1.7 --- Frontend.cpp 27 Mar 2007 03:01:06 -0000 1.8 *************** *** 1,300 **** ! /* ! * The olsr.org Optimized Link-State Routing daemon (olsrd) ! * Copyright (c) 2004, Thomas Lopatic (thomas at lopatic.de) ! * All rights reserved. ! * ! * Redistribution and use in source and binary forms, with or without ! * modification, are permitted provided that the following conditions ! * are met: ! * ! * * Redistributions of source code must retain the above copyright ! * notice, this list of conditions and the following disclaimer. ! * * Redistributions in binary form must reproduce the above copyright ! * notice, this list of conditions and the following disclaimer in ! * the documentation and/or other materials provided with the ! * distribution. ! * * Neither the name of olsr.org, olsrd nor the names of its ! * contributors may be used to endorse or promote products derived ! * from this software without specific prior written permission. ! * ! * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS ! * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT ! * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS ! * FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE ! * COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, ! * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, ! * BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; ! * LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER ! * CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT ! * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ! * ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE ! * POSSIBILITY OF SUCH DAMAGE. ! * ! * Visit http://www.olsr.org for more information. ! * ! * If you find this software useful feel free to make a donation ! * to the project. For more information see the website or contact ! * the copyright holders. ! * ! * $Id$ ! */ ! ! #include "stdafx.h" ! #include "Frontend.h" ! #include "FrontendDlg.h" ! #include "TrayIcon.h" ! ! #ifdef _DEBUG ! #define new DEBUG_NEW ! #undef THIS_FILE ! static char THIS_FILE[] = __FILE__; ! #endif ! ! BEGIN_MESSAGE_MAP(CFrontendApp, CWinApp) ! //{{AFX_MSG_MAP(CFrontendApp) ! //}}AFX_MSG ! ON_COMMAND(ID_HELP, CWinApp::OnHelp) ! END_MESSAGE_MAP() ! ! CFrontendApp::CFrontendApp() ! { ! } ! ! CFrontendApp theApp; ! ! static int SetEnableRedirKey(unsigned long New) ! { ! HKEY Key; ! unsigned long Type; ! unsigned long Len; ! unsigned long Old; ! ! if (::RegOpenKeyEx(HKEY_LOCAL_MACHINE, ! "SYSTEM\\CurrentControlSet\\Services\\Tcpip\\Parameters", ! 0, KEY_READ | KEY_WRITE, &Key) != ERROR_SUCCESS) ! return -1; ! ! Len = sizeof (Old); ! ! if (::RegQueryValueEx(Key, "EnableICMPRedirect", NULL, &Type, ! (unsigned char *)&Old, &Len) != ERROR_SUCCESS || ! Type != REG_DWORD) ! Old = 1; ! ! if (::RegSetValueEx(Key, "EnableICMPRedirect", 0, REG_DWORD, ! (unsigned char *)&New, sizeof (New))) ! { ! ::RegCloseKey(Key); ! return -1; ! } ! ! ::RegCloseKey(Key); ! return Old; ! } ! ! BOOL CFrontendApp::InitInstance() ! { ! int Res; ! ! #ifdef _AFXDLL ! Enable3dControls(); ! #else ! Enable3dControlsStatic(); ! #endif ! ! CCommandLineInfo CmdLineInfo; ! ParseCommandLine(CmdLineInfo); ! ! CFrontendDlg dlg; ! ! tray_icon = new TrayIcon( dlg, AfxGetInstanceHandle() ); ! ! dlg.ConfigFile = CmdLineInfo.m_strFileName; ! ! m_pMainWnd = &dlg; ! ! Res = SetEnableRedirKey(0); ! ! if (Res == 1) ! { ! Res = AfxMessageBox("- WARNING -\n\n" ! "The OLSR software has just switched off the processing of incoming ICMP " ! " redirect messages in your registry.\n\n" ! " Please REBOOT your computer for this change to take effect.\n\n" ! " Do you want to allow the OLSR software to reboot your computer now?\n\n" ! " (Please say \"Yes\".)", MB_YESNO | MB_ICONEXCLAMATION); ! ! if (Res == IDYES) ! { ! HANDLE Proc; ! HMODULE Lib; ! BOOL (*Open)(HANDLE, DWORD, HANDLE *); ! BOOL (*Lookup)(char *, char *, LUID *); ! BOOL (*Adjust)(HANDLE, BOOL, TOKEN_PRIVILEGES *, DWORD, ! TOKEN_PRIVILEGES *, DWORD *); ! HANDLE Token; ! ! Proc = ::GetCurrentProcess(); ! ! Lib = ::LoadLibrary("advapi32.dll"); ! ! if (Lib != NULL) ! { ! Open = (BOOL (*)(HANDLE, DWORD, HANDLE *)) ! ::GetProcAddress(Lib, "OpenProcessToken"); ! ! Lookup = (BOOL (*)(char *, char *, LUID *)) ! ::GetProcAddress(Lib, "LookupPrivilegeValueA"); ! ! Adjust = (BOOL (*)(HANDLE, BOOL, TOKEN_PRIVILEGES *, DWORD, ! TOKEN_PRIVILEGES *, DWORD *)) ! ::GetProcAddress(Lib, "AdjustTokenPrivileges"); ! ! if (Open != NULL && Lookup != NULL && Adjust != NULL) ! { ! struct ! { ! DWORD Count; ! LUID_AND_ATTRIBUTES Priv; ! } ! TokPriv; ! ! Proc = ::GetCurrentProcess(); ! ! if (!Open(Proc, TOKEN_ALL_ACCESS, &Token)) ! AfxMessageBox("OpenProcessToken() failed."); ! ! else if (!Lookup("", "SeShutdownPrivilege", &TokPriv.Priv.Luid)) ! AfxMessageBox("LookupPrivilegeValue() failed."); ! ! else ! { ! TokPriv.Count = 1; ! TokPriv.Priv.Attributes = SE_PRIVILEGE_ENABLED; ! ! if (!Adjust(Token, FALSE, (TOKEN_PRIVILEGES *)&TokPriv, ! 0, NULL, NULL)) ! AfxMessageBox("AdjustTokenPrivilege() failed."); ! } ! } ! ! ::FreeLibrary(Lib); ! } ! ! ::ExitWindowsEx(EWX_REBOOT, 0); ! ::TerminateProcess(Proc, 0); ! } ! } ! ! RedirectStdHandles(); ! ! dlg.DoModal(); ! ! return FALSE; ! } ! ! unsigned int CFrontendApp::RedirectThreadFunc(void) ! { ! char Buff[1000]; ! int Len; ! int Left, Right; ! CString Line; ! CString Int; ! ! while (::ReadFile(OutRead, Buff, sizeof (Buff) - 1, (unsigned long *)&Len, NULL)) ! { ! if (Len == 0) ! break; ! ! Left = 0; ! ! for (Right = 0; Right < Len; Right++) ! { ! if (Buff[Right] != 13) ! Buff[Left++] = Buff[Right]; ! } ! ! Len = Left; ! ! Left = 0; ! ! for (Right = 0; Right < Len; Right++) ! { ! if (Buff[Right] == 10) ! { ! Buff[Right] = 0; ! Line += (Buff + Left); ! ! AfxMessageBox(Line); ! ! Line.Empty(); ! ! Left = Right + 1; ! } ! } ! ! Buff[Right] = 0; ! Line += (Buff + Left); ! } ! ! AfxEndThread(0); ! return 0; ! } ! ! static unsigned int RedirectThreadStub(void *Arg) ! { ! class CFrontendApp *This; ! ! This = (class CFrontendApp *)Arg; ! ! return This->RedirectThreadFunc(); ! } ! ! struct IoInfo ! { ! HANDLE Hand; ! unsigned char Attr; ! char Buff; ! #if defined _MT ! int Flag; ! CRITICAL_SECTION Lock; ! #endif ! }; ! ! extern "C" struct IoInfo *__pioinfo[]; ! ! extern "C" void win32_stdio_hack(unsigned int handle); ! ! int CFrontendApp::RedirectStdHandles(void) ! { ! SECURITY_ATTRIBUTES SecAttr; ! HANDLE OutWrite; ! struct IoInfo *Info; ! ! SecAttr.nLength = sizeof (SECURITY_ATTRIBUTES); ! SecAttr.lpSecurityDescriptor = NULL; ! SecAttr.bInheritHandle = TRUE; ! ! if (!::CreatePipe(&OutRead, &OutWrite, &SecAttr, 0)) ! { ! AfxMessageBox("Cannot create stdout pipe."); ! return -1; ! } ! ! AfxBeginThread(RedirectThreadStub, (void *)this); ! ! Info = __pioinfo[0]; ! ! // Info[1].Hand = OutWrite; ! // Info[1].Attr = 0x89; // FOPEN | FTEXT | FPIPE; ! ! Info[2].Hand = OutWrite; ! Info[2].Attr = 0x89; ! ! // stdout->_file = 1; ! stderr->_file = 2; ! ! win32_stdio_hack((unsigned int)OutWrite); ! ! return 0; ! } --- 1,294 ---- ! /* ! * The olsr.org Optimized Link-State Routing daemon (olsrd) ! * Copyright (c) 2004, Thomas Lopatic (thomas at lopatic.de) ! * All rights reserved. ! * ! * Redistribution and use in source and binary forms, with or without ! * modification, are permitted provided that the following conditions ! * are met: ! * ! * * Redistributions of source code must retain the above copyright ! * notice, this list of conditions and the following disclaimer. ! * * Redistributions in binary form must reproduce the above copyright ! * notice, this list of conditions and the following disclaimer in ! * the documentation and/or other materials provided with the ! * distribution. ! * * Neither the name of olsr.org, olsrd nor the names of its ! * contributors may be used to endorse or promote products derived ! * from this software without specific prior written permission. ! * ! * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS ! * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT ! * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS ! * FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE ! * COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, ! * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, ! * BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; ! * LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER ! * CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT ! * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ! * ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE ! * POSSIBILITY OF SUCH DAMAGE. ! * ! * Visit http://www.olsr.org for more information. ! * ! * If you find this software useful feel free to make a donation ! * to the project. For more information see the website or contact ! * the copyright holders. ! * ! * $Id$ ! */ ! ! #include "stdafx.h" ! #include "Frontend.h" ! #include "FrontendDlg.h" ! #include "TrayIcon.h" ! ! #ifdef _DEBUG ! #define new DEBUG_NEW ! #undef THIS_FILE ! static char THIS_FILE[] = __FILE__; ! #endif ! ! BEGIN_MESSAGE_MAP(CFrontendApp, CWinApp) ! //{{AFX_MSG_MAP(CFrontendApp) ! //}}AFX_MSG ! ON_COMMAND(ID_HELP, CWinApp::OnHelp) ! END_MESSAGE_MAP() ! ! CFrontendApp::CFrontendApp() ! { ! } ! ! CFrontendApp theApp; ! ! static int SetEnableRedirKey(unsigned long New) ! { ! HKEY Key; ! unsigned long Type; ! unsigned long Len; ! unsigned long Old; ! ! if (::RegOpenKeyEx(HKEY_LOCAL_MACHINE, ! "SYSTEM\\CurrentControlSet\\Services\\Tcpip\\Parameters", ! 0, KEY_READ | KEY_WRITE, &Key) != ERROR_SUCCESS) ! return -1; ! ! Len = sizeof (Old); ! ! if (::RegQueryValueEx(Key, "EnableICMPRedirect", NULL, &Type, ! (unsigned char *)&Old, &Len) != ERROR_SUCCESS || ! Type != REG_DWORD) ! Old = 1; ! ! if (::RegSetValueEx(Key, "EnableICMPRedirect", 0, REG_DWORD, ! (unsigned char *)&New, sizeof (New))) ! { ! ::RegCloseKey(Key); ! return -1; ! } ! ! ::RegCloseKey(Key); ! return Old; ! } ! ! BOOL CFrontendApp::InitInstance() ! { ! int Res; ! ! CCommandLineInfo CmdLineInfo; ! ParseCommandLine(CmdLineInfo); ! ! CFrontendDlg dlg; ! ! tray_icon = new TrayIcon( dlg, AfxGetInstanceHandle() ); ! ! dlg.ConfigFile = CmdLineInfo.m_strFileName; ! ! m_pMainWnd = &dlg; ! ! Res = SetEnableRedirKey(0); ! ! if (Res == 1) ! { ! Res = AfxMessageBox("- WARNING -\n\n" ! "The OLSR software has just switched off the processing of incoming ICMP " ! " redirect messages in your registry.\n\n" ! " Please REBOOT your computer for this change to take effect.\n\n" ! " Do you want to allow the OLSR software to reboot your computer now?\n\n" ! " (Please say \"Yes\".)", MB_YESNO | MB_ICONEXCLAMATION); ! ! if (Res == IDYES) ! { ! HANDLE Proc; ! HMODULE Lib; ! BOOL (*Open)(HANDLE, DWORD, HANDLE *); ! BOOL (*Lookup)(char *, char *, LUID *); ! BOOL (*Adjust)(HANDLE, BOOL, TOKEN_PRIVILEGES *, DWORD, ! TOKEN_PRIVILEGES *, DWORD *); ! HANDLE Token; ! ! Proc = ::GetCurrentProcess(); ! ! Lib = ::LoadLibrary("advapi32.dll"); ! ! if (Lib != NULL) ! { ! Open = (BOOL (*)(HANDLE, DWORD, HANDLE *)) ! ::GetProcAddress(Lib, "OpenProcessToken"); ! ! Lookup = (BOOL (*)(char *, char *, LUID *)) ! ::GetProcAddress(Lib, "LookupPrivilegeValueA"); ! ! Adjust = (BOOL (*)(HANDLE, BOOL, TOKEN_PRIVILEGES *, DWORD, ! TOKEN_PRIVILEGES *, DWORD *)) ! ::GetProcAddress(Lib, "AdjustTokenPrivileges"); ! ! if (Open != NULL && Lookup != NULL && Adjust != NULL) ! { ! struct ! { ! DWORD Count; ! LUID_AND_ATTRIBUTES Priv; ! } ! TokPriv; ! ! Proc = ::GetCurrentProcess(); ! ! if (!Open(Proc, TOKEN_ALL_ACCESS, &Token)) ! AfxMessageBox("OpenProcessToken() failed."); ! ! else if (!Lookup("", "SeShutdownPrivilege", &TokPriv.Priv.Luid)) ! AfxMessageBox("LookupPrivilegeValue() failed."); ! ! else ! { ! TokPriv.Count = 1; ! TokPriv.Priv.Attributes = SE_PRIVILEGE_ENABLED; ! ! if (!Adjust(Token, FALSE, (TOKEN_PRIVILEGES *)&TokPriv, ! 0, NULL, NULL)) ! AfxMessageBox("AdjustTokenPrivilege() failed."); ! } ! } ! ! ::FreeLibrary(Lib); ! } ! ! ::ExitWindowsEx(EWX_REBOOT, 0); ! ::TerminateProcess(Proc, 0); ! } ! } ! ! RedirectStdHandles(); ! ! dlg.DoModal(); ! ! return FALSE; ! } ! ! unsigned int CFrontendApp::RedirectThreadFunc(void) ! { ! char Buff[1000]; ! int Len; ! int Left, Right; ! CString Line; ! CString Int; ! ! while (::ReadFile(OutRead, Buff, sizeof (Buff) - 1, (unsigned long *)&Len, NULL)) ! { ! if (Len == 0) ! break; ! ! Left = 0; ! ! for (Right = 0; Right < Len; Right++) ! { ! if (Buff[Right] != 13) ! Buff[Left++] = Buff[Right]; ! } ! ! Len = Left; ! ! Left = 0; ! ! for (Right = 0; Right < Len; Right++) ! { ! if (Buff[Right] == 10) ! { ! Buff[Right] = 0; ! Line += (Buff + Left); ! ! AfxMessageBox(Line); ! ! Line.Empty(); ! ! Left = Right + 1; ! } ! } ! ! Buff[Right] = 0; ! Line += (Buff + Left); ! } ! ! AfxEndThread(0); ! return 0; ! } ! ! static unsigned int RedirectThreadStub(void *Arg) ! { ! class CFrontendApp *This; ! ! This = (class CFrontendApp *)Arg; ! ! return This->RedirectThreadFunc(); ! } ! ! struct IoInfo ! { ! HANDLE Hand; ! unsigned char Attr; ! char Buff; ! #if defined _MT ! int Flag; ! CRITICAL_SECTION Lock; ! #endif ! }; ! ! extern "C" struct IoInfo *__pioinfo[]; ! ! extern "C" void win32_stdio_hack(unsigned int handle); ! ! int CFrontendApp::RedirectStdHandles(void) ! { ! SECURITY_ATTRIBUTES SecAttr; ! HANDLE OutWrite; ! struct IoInfo *Info; ! ! SecAttr.nLength = sizeof (SECURITY_ATTRIBUTES); ! SecAttr.lpSecurityDescriptor = NULL; ! SecAttr.bInheritHandle = TRUE; ! ! if (!::CreatePipe(&OutRead, &OutWrite, &SecAttr, 0)) ! { ! AfxMessageBox("Cannot create stdout pipe."); ! return -1; ! } ! ! AfxBeginThread(RedirectThreadStub, (void *)this); ! ! Info = __pioinfo[0]; ! ! // Info[1].Hand = OutWrite; ! // Info[1].Attr = 0x89; // FOPEN | FTEXT | FPIPE; ! ! Info[2].Hand = OutWrite; ! Info[2].Attr = 0x89; ! ! // stdout->_file = 1; ! stderr->_file = 2; ! ! win32_stdio_hack((unsigned int)OutWrite); ! ! return 0; ! } Index: MyDialog1.cpp =================================================================== RCS file: /cvsroot/olsrd/olsrd-current/gui/win32/Main/MyDialog1.cpp,v retrieving revision 1.6 retrieving revision 1.7 diff -C2 -d -r1.6 -r1.7 *** MyDialog1.cpp 24 Nov 2004 16:46:21 -0000 1.6 --- MyDialog1.cpp 27 Mar 2007 03:01:06 -0000 1.7 *************** *** 1,274 **** ! /* ! * The olsr.org Optimized Link-State Routing daemon (olsrd) ! * Copyright (c) 2004, Thomas Lopatic (thomas at lopatic.de) ! * All rights reserved. ! * ! * Redistribution and use in source and binary forms, with or without ! * modification, are permitted provided that the following conditions ! * are met: ! * ! * * Redistributions of source code must retain the above copyright ! * notice, this list of conditions and the following disclaimer. ! * * Redistributions in binary form must reproduce the above copyright ! * notice, this list of conditions and the following disclaimer in ! * the documentation and/or other materials provided with the ! * distribution. ! * * Neither the name of olsr.org, olsrd nor the names of its ! * contributors may be used to endorse or promote products derived ! * from this software without specific prior written permission. ! * ! * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS ! * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT ! * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS ! * FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE ! * COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, ! * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, ! * BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; ! * LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER ! * CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT ! * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ! * ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE ! * POSSIBILITY OF SUCH DAMAGE. ! * ! * Visit http://www.olsr.org for more information. ! * ! * If you find this software useful feel free to make a donation ! * to the project. For more information see the website or contact ! * the copyright holders. ! * ! * $Id$ ! */ ! ! #include "stdafx.h" ! #include "Frontend.h" ! #include "MyDialog1.h" ! ! #ifdef _DEBUG ! #define new DEBUG_NEW ! #undef THIS_FILE ! static char THIS_FILE[] = __FILE__; ! #endif ! ! MyDialog1::MyDialog1(CWnd* pParent) ! : CDialog(MyDialog1::IDD, pParent) ! { ! NumLines = 0; ! ! //{{AFX_DATA_INIT(MyDialog1) ! //}}AFX_DATA_INIT ! } ! ! BOOL MyDialog1::Create(CWnd *Parent) ! { ! return CDialog::Create(MyDialog1::IDD, Parent); ! } ! ! void MyDialog1::DoDataExchange(CDataExchange* pDX) ! { ! CDialog::DoDataExchange(pDX); ! //{{AFX_DATA_MAP(MyDialog1) ! DDX_Control(pDX, IDC_BUTTON4, m_SaveButton); ! DDX_Control(pDX, IDC_BUTTON3, m_FreezeButton); ! DDX_Control(pDX, IDC_BUTTON2, m_ContinueButton); ! DDX_Control(pDX, IDC_BUTTON1, m_ClearButton); ! DDX_Control(pDX, IDC_EDIT1, m_OutputWindow); ! //}}AFX_DATA_MAP ! } ! ! ! BEGIN_MESSAGE_MAP(MyDialog1, CDialog) ! //{{AFX_MSG_MAP(MyDialog1) ! ON_BN_CLICKED(IDC_BUTTON1, OnClearButton) ! ON_BN_CLICKED(IDC_BUTTON2, OnContinueButton) ! ON_BN_CLICKED(IDC_BUTTON3, OnFreezeButton) ! ON_WM_CTLCOLOR() ! ON_BN_CLICKED(IDOK, OnOK) ! ON_BN_CLICKED(IDCANCEL, OnCancel) ! ON_BN_CLICKED(IDC_BUTTON4, OnSaveButton) ! //}}AFX_MSG_MAP ! END_MESSAGE_MAP() ! ! void MyDialog1::OnOK() ! { ! } ! ! void MyDialog1::OnCancel() ! { ! } ! ! void MyDialog1::AddOutputLine(CString Line) ! { ! int Index; ! ! CritSect.Lock(); ! ! Output += Line + "\r\n"; ! ! if (NumLines == 1000) ! { ! Index = Output.Find("\r\n"); ! Output.Delete(0, Index + 2); ! } ! ! else ! NumLines++; ! ! CritSect.Unlock(); ! ! if (Frozen == 0) ! { ! m_OutputWindow.SetWindowText(Output); ! m_OutputWindow.SetSel(Output.GetLength(), Output.GetLength()); ! } ! } ! ! void MyDialog1::SetFrozen(int NewFrozen) ! { ! Frozen = NewFrozen; ! } ! ! BOOL MyDialog1::OnInitDialog() ! { ! CDialog::OnInitDialog(); ! ! CClientDC DevCont(&m_OutputWindow); ! ! EditFont.CreatePointFont(90, "Courier New", NULL); ! m_OutputWindow.SetFont(&EditFont); ! ! m_FreezeButton.EnableWindow(FALSE); ! m_ContinueButton.EnableWindow(FALSE); ! ! Frozen = 0; ! ! WhiteBrush.CreateSolidBrush(RGB(255, 255, 255)); ! ! return TRUE; ! } ! ! void MyDialog1::OnClearButton() ! { ! CritSect.Lock(); ! Output.Empty(); ! NumLines = 0; ! CritSect.Unlock(); ! ! m_OutputWindow.SetWindowText(Output); ! m_OutputWindow.SetSel(0, 0); ! } ! ! void MyDialog1::OnContinueButton() ! { ! CString Copy; ! int Len; ! ! m_FreezeButton.EnableWindow(TRUE); ! m_ContinueButton.EnableWindow(FALSE); ! ! Frozen = 0; ! ! CritSect.Lock(); ! Copy = Output; ! Len = Output.GetLength(); ! CritSect.Unlock(); ! ! m_OutputWindow.SetWindowText(Copy); ! m_OutputWindow.SetSel(Len, Len); ! } ! ! void MyDialog1::OnFreezeButton() ! { ! m_FreezeButton.EnableWindow(FALSE); ! m_ContinueButton.EnableWindow(TRUE); ! ! Frozen = 1; ! } ! ! void MyDialog1::HandleStart(void) ! { ! CString Copy; ! int Len; ! ! m_FreezeButton.EnableWindow(TRUE); ! m_ContinueButton.EnableWindow(FALSE); ! ! Frozen = 0; ! ! CritSect.Lock(); ! Copy = Output; ! Len = Output.GetLength(); ! CritSect.Unlock(); ! ! m_OutputWindow.SetWindowText(Copy); ! m_OutputWindow.SetSel(Len, Len); ! } ! ! void MyDialog1::HandleStop(void) ! { ! CString Copy; ! int Len; ! ! m_FreezeButton.EnableWindow(FALSE); ! m_ContinueButton.EnableWindow(FALSE); ! ! Frozen = 0; ! ! CritSect.Lock(); ! Copy = Output; ! Len = Output.GetLength(); ! CritSect.Unlock(); ! ! m_OutputWindow.SetWindowText(Copy); ! m_OutputWindow.SetSel(Len, Len); ! } ! ! HBRUSH MyDialog1::OnCtlColor(CDC* pDC, CWnd* pWnd, UINT nCtlColor) ! { ! HBRUSH hbr = CDialog::OnCtlColor(pDC, pWnd, nCtlColor); ! ! if (pWnd == &m_OutputWindow) ! { ! pDC->SetBkColor(RGB(255, 255, 255)); ! hbr = WhiteBrush; ! } ! ! return hbr; ! } ! ! void MyDialog1::OnSaveButton() ! { ! CString Copy; ! int Len; ! CFileDialog FileDialog(FALSE); ! CString FileName = "OLSR log.txt"; ! CString PathName; ! CFile File; ! ! CritSect.Lock(); ! Copy = Output; ! Len = Output.GetLength(); ! CritSect.Unlock(); ! ! FileDialog.m_ofn.lpstrFilter = "Text file (*.txt)\0*.txt\0"; ! FileDialog.m_ofn.nFilterIndex = 1; ! ! FileDialog.m_ofn.lpstrFile = FileName.GetBuffer(500); ! FileDialog.m_ofn.nMaxFile = 500; ! ! if (FileDialog.DoModal() == IDOK) ! { ! PathName = FileDialog.GetPathName(); ! ! if (File.Open(PathName, CFile::modeCreate | CFile::modeWrite | ! CFile::shareExclusive) == 0) ! AfxMessageBox("Cannot open logfile '" + PathName + "'."); ! ! else ! { ! File.Write((const char *)Copy, Len); ! File.Close(); ! } ! } ! ! FileName.ReleaseBuffer(); ! } --- 1,274 ---- ! /* ! * The olsr.org Optimized Link-State Routing daemon (olsrd) ! * Copyright (c) 2004, Thomas Lopatic (thomas at lopatic.de) ! * All rights reserved. ! * ! * Redistribution and use in source and binary forms, with or without ! * modification, are permitted provided that the following conditions ! * are met: ! * ! * * Redistributions of source code must retain the above copyright ! * notice, this list of conditions and the following disclaimer. ! * * Redistributions in binary form must reproduce the above copyright ! * notice, this list of conditions and the following disclaimer in ! * the documentation and/or other materials provided with the ! * distribution. ! * * Neither the name of olsr.org, olsrd nor the names of its ! * contributors may be used to endorse or promote products derived ! * from this software without specific prior written permission. ! * ! * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS ! * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT ! * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS ! * FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE ! * COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, ! * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, ! * BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; ! * LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER ! * CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT ! * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ! * ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE ! * POSSIBILITY OF SUCH DAMAGE. ! * ! * Visit http://www.olsr.org for more information. ! * ! * If you find this software useful feel free to make a donation ! * to the project. For more information see the website or contact ! * the copyright holders. ! * ! * $Id$ ! */ ! ! #include "stdafx.h" ! #include "Frontend.h" ! #include "MyDialog1.h" ! ! #ifdef _DEBUG ! #define new DEBUG_NEW ! #undef THIS_FILE ! static char THIS_FILE[] = __FILE__; ! #endif ! ! MyDialog1::MyDialog1(CWnd* pParent) ! : CDialog(MyDialog1::IDD, pParent) ! { ! NumLines = 0; ! ! //{{AFX_DATA_INIT(MyDialog1) ! //}}AFX_DATA_INIT ! } ! ! BOOL MyDialog1::Create(CWnd *Parent) ! { ! return CDialog::Create(MyDialog1::IDD, Parent); ! } ! ! void MyDialog1::DoDataExchange(CDataExchange* pDX) ! { ! CDialog::DoDataExchange(pDX); ! //{{AFX_DATA_MAP(MyDialog1) ! DDX_Control(pDX, IDC_BUTTON4, m_SaveButton); ! DDX_Control(pDX, IDC_BUTTON3, m_FreezeButton); ! DDX_Control(pDX, IDC_BUTTON2, m_ContinueButton); ! DDX_Control(pDX, IDC_BUTTON1, m_ClearButton); ! DDX_Control(pDX, IDC_EDIT1, m_OutputWindow); ! //}}AFX_DATA_MAP ! } ! ! ! BEGIN_MESSAGE_MAP(MyDialog1, CDialog) ! //{{AFX_MSG_MAP(MyDialog1) ! ON_BN_CLICKED(IDC_BUTTON1, OnClearButton) ! ON_BN_CLICKED(IDC_BUTTON2, OnContinueButton) ! ON_BN_CLICKED(IDC_BUTTON3, OnFreezeButton) ! ON_WM_CTLCOLOR() ! ON_BN_CLICKED(IDOK, OnOK) ! ON_BN_CLICKED(IDCANCEL, OnCancel) ! ON_BN_CLICKED(IDC_BUTTON4, OnSaveButton) ! //}}AFX_MSG_MAP ! END_MESSAGE_MAP() ! ! void MyDialog1::OnOK() ! { ! } ! ! void MyDialog1::OnCancel() ! { ! } ! ! void MyDialog1::AddOutputLine(CString Line) ! { ! int Index; ! ! CritSect.Lock(); ! ! Output += Line + "\r\n"; ! ! if (NumLines == 1000) ! { ! Index = Output.Find("\r\n"); ! Output.Delete(0, Index + 2); ! } ! ! else ! NumLines++; ! ! CritSect.Unlock(); ! ! if (Frozen == 0) ! { ! m_OutputWindow.SetWindowText(Output); ! m_OutputWindow.SetSel(Output.GetLength(), Output.GetLength()); ! } ! } ! ! void MyDialog1::SetFrozen(int NewFrozen) ! { ! Frozen = NewFrozen; ! } ! ! BOOL MyDialog1::OnInitDialog() ! { ! CDialog::OnInitDialog(); ! ! CClientDC DevCont(&m_OutputWindow); ! ! EditFont.CreatePointFont(90, "Courier New", NULL); ! m_OutputWindow.SetFont(&EditFont); ! ! m_FreezeButton.EnableWindow(FALSE); ! m_ContinueButton.EnableWindow(FALSE); ! ! Frozen = 0; ! ! WhiteBrush.CreateSolidBrush(RGB(255, 255, 255)); ! ! return TRUE; ! } ! ! void MyDialog1::OnClearButton() ! { ! CritSect.Lock(); ! Output.Empty(); ! NumLines = 0; ! CritSect.Unlock(); ! ! m_OutputWindow.SetWindowText(Output); ! m_OutputWindow.SetSel(0, 0); ! } ! ! void MyDialog1::OnContinueButton() ! { ! CString Copy; ! int Len; ! ! m_FreezeButton.EnableWindow(TRUE); ! m_ContinueButton.EnableWindow(FALSE); ! ! Frozen = 0; ! ! CritSect.Lock(); ! Copy = Output; ! Len = Output.GetLength(); ! CritSect.Unlock(); ! ! m_OutputWindow.SetWindowText(Copy); ! m_OutputWindow.SetSel(Len, Len); ! } ! ! void MyDialog1::OnFreezeButton() ! { ! m_FreezeButton.EnableWindow(FALSE); ! m_ContinueButton.EnableWindow(TRUE); ! ! Frozen = 1; ! } ! ! void MyDialog1::HandleStart(void) ! { ! CString Copy; ! int Len; ! ! m_FreezeButton.EnableWindow(TRUE); ! m_ContinueButton.EnableWindow(FALSE); ! ! Frozen = 0; ! ! CritSect.Lock(); ! Copy = Output; ! Len = Output.GetLength(); ! CritSect.Unlock(); ! ! m_OutputWindow.SetWindowText(Copy); ! m_OutputWindow.SetSel(Len, Len); ! } ! ! void MyDialog1::HandleStop(void) ! { ! CString Copy; ! int Len; ! ! m_FreezeButton.EnableWindow(FALSE); ! m_ContinueButton.EnableWindow(FALSE); ! ! Frozen = 0; ! ! CritSect.Lock(); ! Copy = Output; ! Len = Output.GetLength(); ! CritSect.Unlock(); ! ! m_OutputWindow.SetWindowText(Copy); ! m_OutputWindow.SetSel(Len, Len); ! } ! ! HBRUSH MyDialog1::OnCtlColor(CDC* pDC, CWnd* pWnd, UINT nCtlColor) ! { ! HBRUSH hbr = CDialog::OnCtlColor(pDC, pWnd, nCtlColor); ! ! if (pWnd == &m_OutputWindow) ! { ! pDC->SetBkColor(RGB(255, 255, 255)); ! hbr = WhiteBrush; ! } ! ! return hbr; ! } ! ! void MyDialog1::OnSaveButton() ! { ! CString Copy; ! int Len; ! CFileDialog FileDialog(FALSE); ! CString FileName = "OLSR log.txt"; ! CString PathName; ! CFile File; ! ! CritSect.Lock(); ! Copy = Output; ! Len = Output.GetLength(); ! CritSect.Unlock(); ! ! FileDialog.m_ofn.lpstrFilter = "Text file (*.txt)\0*.txt\0"; ! FileDialog.m_ofn.nFilterIndex = 1; ! ! FileDialog.m_ofn.lpstrFile = FileName.GetBuffer(500); ! FileDialog.m_ofn.nMaxFile = 500; ! ! if (FileDialog.DoModal() == IDOK) ! { ! PathName = FileDialog.GetPathName(); ! ! if (File.Open(PathName, CFile::modeCreate | CFile::modeWrite | ! CFile::shareExclusive) == 0) ! AfxMessageBox("Cannot open logfile '" + PathName + "'."); ! ! else ! { ! File.Write((const char *)Copy, Len); ! File.Close(); ! } ! } ! ! FileName.ReleaseBuffer(); ! } Index: RFC-Default.olsr =================================================================== RCS file: /cvsroot/olsrd/olsrd-current/gui/win32/Main/RFC-Default.olsr,v retrieving revision 1.1 retrieving revision 1.2 diff -C2 -d -r1.1 -r1.2 *** RFC-Default.olsr 31 Mar 2005 18:20:02 -0000 1.1 --- RFC-Default.olsr 27 Mar 2007 03:01:07 -0000 1.2 *************** *** 1,122 **** ! # ! # Default configuration for the GUI ! # ! # $Id$ ! # ! ! # ! # By default don't print anything to save CPU cycles ! # ! ! DebugLevel 0 ! ! # ! # Enable the link quality extensions? ! # ! # 0 - no ! # 1 - yes, use link quality for MPR selection ! # 2 - yes, use link quality for MPR selection and routing ! # ! ! LinkQualityLevel 0 ! ! # ! # Windows size for packet loss calculation ! # ! ! LinkQualityWinSize 10 ! ! # ! # Do not use hysteresis ! # ! ! UseHysteresis no ! ! # ! # If using hysteresis, use the RFC parameters ! # ! ! HystScaling 0.5 ! HystThrHigh 0.8 ! HystThrLow 0.3 ! ! # ! # The pollrate used by the scheduler ! # ! ! Pollrate 0.1 ! ! # ! # Which neighbours should be advertised via TC messages? ! # ! # 0 - only advertise our MPR selectors ! # 1 - advertise our MPR selectors and our MPRs ! # 2 - advertise all neighbors ! # ! ! TcRedundancy 0 ! ! # ! # Specifies by how many MPRs each two-hop neighbour should be covered ! # ! ! MprCoverage 1 ! ! # ! # Load the HTTP info plugin ! # ! ! LoadPlugin "olsrd_httpinfo.dll" ! { ! PlParam "Net" "0.0.0.0 0.0.0.0" ! } ! ! # ! # This default gateway HNA will only be considered by the GUI if the ! # computer actually has a default route. ! # ! ! Hna4 ! { ! 0.0.0.0 0.0.0.0 ! } ! ! # ! # Pseudo interface used by the GUI. If we do not select any interface ! # in the GUI, we still have to store the per-interface settings of the ! # GUI somewhere. We then simply create a pseudo interfaced named GUI" ! # for storing this information. When parsing the configuration file, ! # the settings will be read and will be used to populate the GUI, but ! # after that the "GUI" interface will be discarded. ! # ! ! Interface "GUI" ! { ! # ! # HELLO interval and validity time in seconds (float) ! # ! ! HelloInterval 2.0 ! HelloValidityTime 6.0 ! ! # ! # TC interval and validity time in seconds (float) ! # ! ! TcInterval 5.0 ! TcValidityTime 15.0 ! ! # ! # MID interval and validity time in seconds (float) ! # ! ! MidInterval 5.0 ! MidValidityTime 15.0 ! ! # ! # HNA interval and validity time in seconds (float) ! # ! ! HnaInterval 5.0 ! HnaValidityTime 15.0 ! } --- 1,131 ---- ! # ! # Default configuration for the GUI ! # ! # $Id$ ! # ! ! # ! # By default don't print anything to save CPU cycles ! # ! ! DebugLevel 0 ! ! # ! # Enable the link quality extensions? ! # ! # 0 - no ! # 1 - yes, use link quality for MPR selection ! # 2 - yes, use link quality for MPR selection and routing ! # ! ! LinkQualityLevel 0 ! ! # ! # Enable the fish eye algorithm ! # ! # 0 - no ! # 1 - yes ! # ! ! LinkQualityFishEye 0 ! ! # ! # Windows size for packet loss calculation ! # ! ! LinkQualityWinSize 10 ! ! # ! # Do not use hysteresis ! # ! ! UseHysteresis no ! ! # ! # If using hysteresis, use the RFC parameters ! # ! ! HystScaling 0.5 ! HystThrHigh 0.8 ! HystThrLow 0.3 ! ! # ! # The pollrate used by the scheduler ! # ! ! Pollrate 0.1 ! ! # ! # Which neighbours should be advertised via TC messages? ! # ! # 0 - only advertise our MPR selectors ! # 1 - advertise our MPR selectors and our MPRs ! # 2 - advertise all neighbors ! # ! ! TcRedundancy 0 ! ! # ! # Specifies by how many MPRs each two-hop neighbour should be covered ! # ! ! MprCoverage 1 ! ! # ! # Load the HTTP info plugin ! # ! ! LoadPlugin "olsrd_httpinfo.dll" ! { ! PlParam "Net" "0.0.0.0 0.0.0.0" ! } ! ! # ! # This default gateway HNA will only be considered by the GUI if the ! # computer actually has a default route. ! # ! ! Hna4 ! { ! 0.0.0.0 0.0.0.0 ! } ! ! # ! # Pseudo interface used by the GUI. If we do not select any interface ! # in the GUI, we still have to store the per-interface settings of the ! # GUI somewhere. We then simply create a pseudo interfaced named GUI" ! # for storing this information. When parsing the configuration file, ! # the settings will be read and will be used to populate the GUI, but ! # after that the "GUI" interface will be discarded. ! # ! ! Interface "GUI" ! { ! # ! # HELLO interval and validity time in seconds (float) ! # ! ! HelloInterval 2.0 ! HelloValidityTime 6.0 ! ! # ! # TC interval and validity time in seconds (float) ! # ! ! TcInterval 5.0 ! TcValidityTime 15.0 ! ! # ! # MID interval and validity time in seconds (float) ! # ! ! MidInterval 5.0 ! MidValidityTime 15.0 ! ! # ! # HNA interval and validity time in seconds (float) ! # ! ! HnaInterval 5.0 ! HnaValidityTime 15.0 ! } Index: MyDialog3.cpp =================================================================== RCS file: /cvsroot/olsrd/olsrd-current/gui/win32/Main/MyDialog3.cpp,v retrieving revision 1.4 retrieving revision 1.5 diff -C2 -d -r1.4 -r1.5 *** MyDialog3.cpp 21 Nov 2004 01:21:10 -0000 1.4 --- MyDialog3.cpp 27 Mar 2007 03:01:06 -0000 1.5 *************** *** 1,308 **** ! /* ! * The olsr.org Optimized Link-State Routing daemon (olsrd) ! * Copyright (c) 2004, Thomas Lopatic (thomas at lopatic.de) ! * All rights reserved. ! * ! * Redistribution and use in source and binary forms, with or without ! * modification, are permitted provided that the following conditions ! * are met: ! * ! * * Redistributions of source code must retain the above copyright ! * notice, this list of conditions and the following disclaimer. ! * * Redistributions in binary form must reproduce the above copyright ! * notice, this list of conditions and the following disclaimer in ! * the documentation and/or other materials provided with the ! * distribution. ! * * Neither the name of olsr.org, olsrd nor the names of its ! * contributors may be used to endorse or promote products derived ! * from this software without specific prior written permission. ! * ! * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS ! * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT ! * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS ! * FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE ! * COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, ! * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, ! * BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; ! * LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER ! * CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT ! * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ! * ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE ! * POSSIBILITY OF SUCH DAMAGE. ! * ! * Visit http://www.olsr.org for more information. ! * ! * If you find this software useful feel free to make a donation ! * to the project. For more information see the website or contact ! * the copyright holders. ! * ! * $Id$ ! */ ! ! #include "stdafx.h" ! #include "Frontend.h" ! #include "MyDialog3.h" ! ! #include "MprEntry.h" ! #include "MidEntry.h" ! #include "HnaEntry.h" ! ! #ifdef _DEBUG ! #define new DEBUG_NEW ! #undef THIS_FILE ! static char THIS_FILE[] = __FILE__; ! #endif ! ! MyDialog3::MyDialog3(CWnd* pParent) ! : CDialog(MyDialog3::IDD, pParent) ! { ! LastUpdate = 0; ! Info = NULL; ! ! //{{AFX_DATA_INIT(MyDialog3) ! //}}AFX_DATA_INIT ! } ! ! BOOL MyDialog3::Create(CWnd *Parent) ! { ! return CDialog::Create(MyDialog3::IDD, Parent); ! } ! ! void MyDialog3::DoDataExchange(CDataExchange* pDX) ! { ! CDialog::DoDataExchange(pDX); ! //{{AFX_DATA_MAP(MyDialog3) ! DDX_Control(pDX, IDC_LIST6, m_HnaList); ! DDX_Control(pDX, IDC_LIST5, m_MidList); ! DDX_Control(pDX, IDC_LIST4, m_MprList); ! DDX_Control(pDX, IDC_LIST1, m_NodeList); ! //}}AFX_DATA_MAP ! } ! ! BEGIN_MESSAGE_MAP(MyDialog3, CDialog) ! //{{AFX_MSG_MAP(MyDialog3) ! ON_BN_CLICKED(IDOK, OnOK) ! ON_BN_CLICKED(IDCANCEL, OnCancel) ! ON_NOTIFY(LVN_ITEMCHANGED, IDC_LIST1, OnItemchangedNodeList) ! //}}AFX_MSG_MAP ! END_MESSAGE_MAP() ! ! void MyDialog3::OnOK() ! { ! } ! ! void MyDialog3::OnCancel() ! { ! } ! ! BOOL MyDialog3::OnInitDialog() ! { ! CDialog::OnInitDialog(); ! ! m_NodeList.InsertColumn(0, "Address", LVCFMT_LEFT, 110, 0); ! m_NodeList.InsertColumn(1, "Timeout", LVCFMT_LEFT, 110, 1); ! m_NodeList.InsertColumn(2, "MID", LVCFMT_LEFT, 68, 2); ! m_NodeList.InsertColumn(3, "HNA", LVCFMT_LEFT, 67, 3); ! ! m_MprList.InsertColumn(0, "MPR", LVCFMT_LEFT, 169, 0); ! ! m_MidList.InsertColumn(0, "MID", LVCFMT_LEFT, 169, 0); ! ! m_HnaList.InsertColumn(0, "HNA", LVCFMT_LEFT, 169, 0); ! ! return TRUE; ! } ! ! void MyDialog3::ClearNodeInfo(void) ! { ! m_NodeList.DeleteAllItems(); ! ! m_MprList.DeleteAllItems(); ! m_MidList.DeleteAllItems(); ! m_HnaList.DeleteAllItems(); ! ! if (Info != NULL) ! { ! delete[] Info; ! Info = NULL; ! } ! } ! ! void MyDialog3::UpdateNodeInfo(CList &NodeList) ! { ! SYSTEMTIME SysTime; ! FILETIME FileTime; ! unsigned __int64 Now; ! class NodeEntry Entry; ! POSITION Pos; ! CString AddrStr; ! CString TimeoutStr; ! int Idx, Num; ! POSITION Pos2; ! class MprEntry MprEntry; ! class MidEntry MidEntry; ! class HnaEntry HnaEntry; ! CString CurrNode; ! ! ::GetSystemTime(&SysTime); ! ::SystemTimeToFileTime(&SysTime, &FileTime); ! ! Now = *(unsigned __int64 *)&FileTime; ! ! if (Now < LastUpdate + (__int64)3 * (__int64)10000000) ! return; ! ! LastUpdate = Now; ! ! int CurrItem = m_NodeList.GetNextItem(-1, LVNI_SELECTED); ! ! if (CurrItem >= 0) ! CurrNode = m_NodeList.GetItemText(CurrItem, 0); ! ! m_NodeList.DeleteAllItems(); ! ! if (Info != NULL) ! { ! delete[] Info; ! Info = NULL; ! } ! ! Num = NodeList.GetCount(); ! ! if (Num == 0) ! return; ! ! Info = new class NodeInfo[Num]; ! ! Pos = NodeList.GetHeadPosition(); ! ! Idx = 0; ! ! while (Pos != NULL) ! { ! Entry = NodeList.GetNext(Pos); ! ! Pos2 = Entry.MprList.GetHeadPosition(); ! ! while (Pos2 != NULL) ! { ! MprEntry = Entry.MprList.GetNext(Pos2); ! ! AddrStr.Format("%d.%d.%d.%d", ! ((unsigned char *)&MprEntry.Addr)[0], ((unsigned char *)&MprEntry.Addr)[1], ! ((unsigned char *)&MprEntry.Addr)[2], ((unsigned char *)&MprEntry.Addr)[3]); ! ! Info[Idx].MprList.Add(AddrStr); ! } ! ! Pos2 = Entry.MidList.GetHeadPosition(); ! ! while (Pos2 != NULL) ! { ! MidEntry = Entry.MidList.GetNext(Pos2); ! ! AddrStr.Format("%d.%d.%d.%d", ! ((unsigned char *)&MidEntry.Addr)[0], ((unsigned char *)&MidEntry.Addr)[1], ! ((unsigned char *)&MidEntry.Addr)[2], ((unsigned char *)&MidEntry.Addr)[3]); ! ! Info[Idx].MidList.Add(AddrStr); ! } ! ! Pos2 = Entry.HnaList.GetHeadPosition(); ! ! while (Pos2 != NULL) ! { ! HnaEntry = Entry.HnaList.GetNext(Pos2); ! ! unsigned int Mask = 0x80000000; ! unsigned int Val = ::ntohl(HnaEntry.Mask); ! int Bits; ! ! for (Bits = 0; Bits < 32; Bits++) ! { ! if ((Val & Mask) == 0) ! break; ! ! Mask >>= 1; ! } ! ! AddrStr.Format("%d.%d.%d.%d/%d", ! ((unsigned char *)&HnaEntry.Addr)[0], ((unsigned char *)&HnaEntry.Addr)[1], ! ((unsigned char *)&HnaEntry.Addr)[2], ((unsigned char *)&HnaEntry.Addr)[3], ! Bits); ! ! Info[Idx].HnaList.Add(AddrStr); ! } ! ! AddrStr.Format("%d.%d.%d.%d", ! ((unsigned char *)&Entry.Addr)[0], ((unsigned char *)&Entry.Addr)[1], ! ((unsigned char *)&Entry.Addr)[2], ((unsigned char *)&Entry.Addr)[3]); ! ! m_NodeList.InsertItem(Idx, AddrStr); ! ! if (AddrStr == CurrNode) ! m_NodeList.SetItemState(Idx, LVIS_SELECTED, LVIS_SELECTED); ! ! SYSTEMTIME SysTime; ! FILETIME LocalFileTime; ! ! ::FileTimeToLocalFileTime((FILETIME *)&Entry.Timeout, &LocalFileTime); ! ::FileTimeToSystemTime(&LocalFileTime, &SysTime); ! ! TimeoutStr.Format("%02d:%02d:%02d", SysTime.wHour, SysTime.wMinute, ! SysTime.wSecond); ! ! m_NodeList.SetItemText(Idx, 1, TimeoutStr); ! ! if (Entry.MidList.IsEmpty()) ! m_NodeList.SetItemText(Idx, 2, "no"); ! ! else ! m_NodeList.SetItemText(Idx, 2, "yes"); ! ! if (Entry.HnaList.IsEmpty()) ! m_NodeList.SetItemText(Idx, 3, "no"); ! ! else ! m_NodeList.SetItemText(Idx, 3, "yes"); ! ! Idx++; ! } ! } ! ! void MyDialog3::OnItemchangedNodeList(NMHDR* pNMHDR, LRESULT* pResult) ! { ! int Item; ! int Idx; ! int Num; ! ! pNMHDR = pNMHDR; ! ! *pResult = 0; ! ! Item = m_NodeList.GetNextItem(-1, LVNI_SELECTED); ! ! if (Item < 0) ! return; ! ! m_MprList.DeleteAllItems(); ! ! Num = Info[Item].MprList.GetSize(); ! ! for (Idx = 0; Idx < Num; Idx++) ! m_MprList.InsertItem(Idx, Info[Item].MprList.GetAt(Idx)); ! ! m_MidList.DeleteAllItems(); ! ! Num = Info[Item].MidList.GetSize(); ! ! for (Idx = 0; Idx < Num; Idx++) ! m_MidList.InsertItem(Idx, Info[Item].MidList.GetAt(Idx)); ! ! m_HnaList.DeleteAllItems(); ! ! Num = Info[Item].HnaList.GetSize(); ! ! for (Idx = 0; Idx < Num; Idx++) ! m_HnaList.InsertItem(Idx, Info[Item].HnaList.GetAt(Idx)); ! } --- 1,308 ---- ! /* ! * The olsr.org Optimized Link-State Routing daemon (olsrd) ! * Copyright (c) 2004, Thomas Lopatic (thomas at lopatic.de) ! * All rights reserved. ! * ! * Redistribution and use in source and binary forms, with or without ! * modification, are permitted provided that the following conditions ! * are met: ! * ! * * Redistributions of source code must retain the above copyright ! * notice, this list of conditions and the following disclaimer. ! * * Redistributions in binary form must reproduce the above copyright ! * notice, this list of conditions and the following disclaimer in ! * the documentation and/or other materials provided with the ! * distribution. ! * * Neither the name of olsr.org, olsrd nor the names of its ! * contributors may be used to endorse or promote products derived ! * from this software without specific prior written permission. ! * ! * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS ! * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT ! * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS ! * FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE ! * COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, ! * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, ! * BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; ! * LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER ! * CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT ! * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ! * ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE ! * POSSIBILITY OF SUCH DAMAGE. ! * ! * Visit http://www.olsr.org for more information. ! * ! * If you find this software useful feel free to make a donation ! * to the project. For more information see the website or contact ! * the copyright holders. ! * ! * $Id$ ! */ ! ! #include "stdafx.h" ! #include "Frontend.h" ! #include "MyDialog3.h" ! ! #include "MprEntry.h" ! #include "MidEntry.h" ! #include "HnaEntry.h" ! ! #ifdef _DEBUG ! #define new DEBUG_NEW ! #undef THIS_FILE ! static char THIS_FILE[] = __FILE__; ! #endif ! ! MyDialog3::MyDialog3(CWnd* pParent) ! : CDialog(MyDialog3::IDD, pParent) ! { ! LastUpdate = 0; ! Info = NULL; ! ! //{{AFX_DATA_INIT(MyDialog3) ! //}}AFX_DATA_INIT ! } ! ! BOOL MyDialog3::Create(CWnd *Parent) ! { ! return CDialog::Create(MyDialog3::IDD, Parent); ! } ! ! void MyDialog3::DoDataExchange(CDataExchange* pDX) ! { ! CDialog::DoDataExchange(pDX); ! //{{AFX_DATA_MAP(MyDialog3) ! DDX_Control(pDX, IDC_LIST6, m_HnaList); ! DDX_Control(pDX, IDC_LIST5, m_MidList); ! DDX_Control(pDX, IDC_LIST4, m_MprList); ! DDX_Control(pDX, IDC_LIST1, m_NodeList); ! //}}AFX_DATA_MAP ! } ! ! BEGIN_MESSAGE_MAP(MyDialog3, CDialog) ! //{{AFX_MSG_MAP(MyDialog3) ! ON_BN_CLICKED(IDOK, OnOK) ! ON_BN_CLICKED(IDCANCEL, OnCancel) ! ON_NOTIFY(LVN_ITEMCHANGED, IDC_LIST1, OnItemchangedNodeList) ! //}}AFX_MSG_MAP ! END_MESSAGE_MAP() ! ! void MyDialog3::OnOK() ! { ! } ! ! void MyDialog3::OnCancel() ! { ! } ! ! BOOL MyDialog3::OnInitDialog() ! { ! CDialog::OnInitDialog(); ! ! m_NodeList.InsertColumn(0, "Address", LVCFMT_LEFT, 110, 0); ! m_NodeList.InsertColumn(1, "Timeout", LVCFMT_LEFT, 110, 1); ! m_NodeList.InsertColumn(2, "MID", LVCFMT_LEFT, 68, 2); ! m_NodeList.InsertColumn(3, "HNA", LVCFMT_LEFT, 67, 3); ! ! m_MprList.InsertColumn(0, "MPR", LVCFMT_LEFT, 169, 0); ! ! m_MidList.InsertColumn(0, "MID", LVCFMT_LEFT, 169, 0); ! ! m_HnaList.InsertColumn(0, "HNA", LVCFMT_LEFT, 169, 0); ! ! return TRUE; ! } ! ! void MyDialog3::ClearNodeInfo(void) ! { ! m_NodeList.DeleteAllItems(); ! ! m_MprList.DeleteAllItems(); ! m_MidList.DeleteAllItems(); ! m_HnaList.DeleteAllItems(); ! ! if (Info != NULL) ! { ! delete[] Info; ! Info = NULL; ! } ! } ! ! void MyDialog3::UpdateNodeInfo(CList &NodeList) ! { ! SYSTEMTIME SysTime; ! FILETIME FileTime; ! unsigned __int64 Now; ! class NodeEntry Entry; ! POSITION Pos; ! CString AddrStr; ! CString TimeoutStr; ! int Idx, Num; ! POSITION Pos2; ! class MprEntry MprEntry; ! class MidEntry MidEntry; ! class HnaEntry HnaEntry; ! CString CurrNode; ! ! ::GetSystemTime(&SysTime); ! ::SystemTimeToFileTime(&SysTime, &FileTime); ! ! Now = *(unsigned __int64 *)&FileTime; ! ! if (Now < LastUpdate + (__int64)3 * (__int64)10000000) ! return; ! ! LastUpdate = Now; ! ! int CurrItem = m_NodeList.GetNextItem(-1, LVNI_SELECTED); ! ! if (CurrItem >= 0) ! CurrNode = m_NodeList.GetItemText(CurrItem, 0); ! ! m_NodeList.DeleteAllItems(); ! ! if (Info != NULL) ! { ! delete[] Info; ! Info = NULL; ! } ! ! Num = NodeList.GetCount(); ! ! if (Num == 0) ! return; ! ! Info = new class NodeInfo[Num]; ! ! Pos = NodeList.GetHeadPosition(); ! ! Idx = 0; ! ! while (Pos != NULL) ! { ! Entry = NodeList.GetNext(Pos); ! ! Pos2 = Entry.MprList.GetHeadPosition(); ! ! while (Pos2 != NULL) ! { ! MprEntry = Entry.MprList.GetNext(Pos2); ! ! AddrStr.Format("%d.%d.%d.%d", ! ((unsigned char *)&MprEntry.Addr)[0], ((unsigned char *)&MprEntry.Addr)[1], ! ((unsigned char *)&MprEntry.Addr)[2], ((unsigned char *)&MprEntry.Addr)[3]); ! ! Info[Idx].MprList.Add(AddrStr); ! } ! ! Pos2 = Entry.MidList.GetHeadPosition(); ! ! while (Pos2 != NULL) ! { ! MidEntry = Entry.MidList.GetNext(Pos2); ! ! AddrStr.Format("%d.%d.%d.%d", ! ((unsigned char *)&MidEntry.Addr)[0], ((unsigned char *)&MidEntry.Addr)[1], ! ((unsigned char *)&MidEntry.Addr)[2], ((unsigned char *)&MidEntry.Addr)[3]); ! ! Info[Idx].MidList.Add(AddrStr); ! } ! ! Pos2 = Entry.HnaList.GetHeadPosition(); ! ! while (Pos2 != NULL) ! { ! HnaEntry = Entry.HnaList.GetNext(Pos2); ! ! unsigned int Mask = 0x80000000; ! unsigned int Val = ::ntohl(HnaEntry.Mask); ! int Bits; ! ! for (Bits = 0; Bits < 32; Bits++) ! { ! if ((Val & Mask) == 0) ! break; ! ! Mask >>= 1; ! } ! ! AddrStr.Format("%d.%d.%d.%d/%d", ! ((unsigned char *)&HnaEntry.Addr)[0], ((unsigned char *)&HnaEntry.Addr)[1], ! ((unsigned char *)&HnaEntry.Addr)[2], ((unsigned char *)&HnaEntry.Addr)[3], ! Bits); ! ! Info[Idx].HnaList.Add(AddrStr); ! } ! ! AddrStr.Format("%d.%d.%d.%d", ! ((unsigned char *)&Entry.Addr)[0], ((unsigned char *)&Entry.Addr)[1], ! ((unsigned char *)&Entry.Addr)[2], ((unsigned char *)&Entry.Addr)[3]); ! ! m_NodeList.InsertItem(Idx, AddrStr); ! ! if (AddrStr == CurrNode) ! m_NodeList.SetItemState(Idx, LVIS_SELECTED, LVIS_SELECTED); ! ! SYSTEMTIME SysTime; ! FILETIME LocalFileTime; ! ! ::FileTimeToLocalFileTime((FILETIME *)&Entry.Timeout, &LocalFileTime); ! ::FileTimeToSystemTime(&LocalFileTime, &SysTime); ! ! TimeoutStr.Format("%02d:%02d:%02d", SysTime.wHour, SysTime.wMinute, ! SysTime.wSecond); ! ! m_NodeList.SetItemText(Idx, 1, TimeoutStr); ! ! if (Entry.MidList.IsEmpty()) ! m_NodeList.SetItemText(Idx, 2, "no"); ! ! else ! m_NodeList.SetItemText(Idx, 2, "yes"); ! ! if (Entry.HnaList.IsEmpty()) ! m_NodeList.SetItemText(Idx, 3, "no"); ! ! else ! m_NodeList.SetItemText(Idx, 3, "yes"); ! ! Idx++; ! } ! } ! ! void MyDialog3::OnItemchangedNodeList(NMHDR* pNMHDR, LRESULT* pResult) ! { ! int Item; ! int Idx; ! int Num; ! ! pNMHDR = pNMHDR; ! ! *pResult = 0; ! ! Item = m_NodeList.GetNextItem(-1, LVNI_SELECTED); ! ! if (Item < 0) ! return; ! ! m_MprList.DeleteAllItems(); ! ! Num = Info[Item].MprList.GetSize(); ! ! for (Idx = 0; Idx < Num; Idx++) ! m_MprList.InsertItem(Idx, Info[Item].MprList.GetAt(Idx)); ! ! m_MidList.DeleteAllItems(); ! ! Num = Info[Item].MidList.GetSize(); ! ! for (Idx = 0; Idx < Num; Idx++) ! m_MidList.InsertItem(Idx, Info[Item].MidList.GetAt(Idx)); ! ! m_HnaList.DeleteAllItems(); ! ! Num = Info[Item].HnaList.GetSize(); ! ! for (Idx = 0; Idx < Num; Idx++) ! m_HnaList.InsertItem(Idx, Info[Item].HnaList.GetAt(Idx)); ! } Index: MyEdit.h =================================================================== RCS file: /cvsroot/olsrd/olsrd-current/gui/win32/Main/MyEdit.h,v retrieving revision 1.3 retrieving revision 1.4 diff -C2 -d -r1.3 -r1.4 *** MyEdit.h 21 Nov 2004 01:21:10 -0000 1.3 --- MyEdit.h 27 Mar 2007 03:01:06 -0000 1.4 *************** *** 1,71 **** ! /* ! * The olsr.org Optimized Link-State Routing daemon (olsrd) ! * Copyright (c) 2004, Thomas Lopatic (thomas at lopatic.de) ! * All rights reserved. ! * ! * Redistribution and use in source and binary forms, with or without ! * modification, are permitted provided that the following conditions ! * are met: ! * ! * * Redistributions of source code must retain the above copyright ! * notice, this list of conditions and the following disclaimer. ! * * Redistributions in binary form must reproduce the above copyright ! * notice, this list of conditions and the following disclaimer in ! * the documentation and/or other materials provided with the ! * distribution. ! * * Neither the name of olsr.org, olsrd nor the names of its ! * contributors may be used to endorse or promote products derived ! * from this software without specific prior written permission. ! * ! * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS ! * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT ! * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS ! * FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE ! * COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, ! * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, ! * BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; ! * LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER ! * CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT ! * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ! * ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE ! * POSSIBILITY OF SUCH DAMAGE. ! * ! * Visit http://www.olsr.org for more information. ! * ! * If you find this software useful feel free to make a donation ! * to the project. For more information see the website or contact ! * the copyright holders. ! * ! * $Id$ ! */ ! ! #if !defined(AFX_MYEDIT_H__951EC391_AFE3_428F_865D_24CA55C68C7C__INCLUDED_) ! #define AFX_MYEDIT_H__951EC391_AFE3_428F_865D_24CA55C68C7C__INCLUDED_ ! ! #if _MSC_VER > 1000 ! #pragma once ! #endif ! ! class MyEdit : public CEdit ! { ! public: ! ! MyEdit(); ! ! //{{AFX_VIRTUAL(MyEdit) ! //}}AFX_VIRTUAL ! ! virtual ~MyEdit(); ! ! protected: ! //{{AFX_MSG(MyEdit) ! afx_msg void OnChar(UINT nChar, UINT nRepCnt, UINT nFlags); ! afx_msg void OnKillFocus(CWnd* pNewWnd); ! //}}AFX_MSG ! ! DECLARE_MESSAGE_MAP() ! }; ! ! //{{AFX_INSERT_LOCATION}} ! ! #endif --- 1,71 ---- ! /* ! * The olsr.org Optimized Link-State Routing daemon (olsrd) ! * Copyright (c) 2004, Thomas Lopatic (thomas at lopatic.de) ! * All rights reserved. ! * ! * Redistribution and use in source and binary forms, with or without ! * modification, are permitted provided that the following conditions ! * are met: ! * ! * * Redistributions of source code must retain the above copyright ! * notice, this list of conditions and the following disclaimer. ! * * Redistributions in binary form must reproduce the above copyright ! * notice, this list of conditions and the following disclaimer in ! * the documentation and/or other materials provided with the ! * distribution. ! * * Neither the name of olsr.org, olsrd nor the names of its ! * contributors may be used to endorse or promote products derived ! * from this software without specific prior written permission. ! * ! * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS ! * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT ! * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS ! * FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE ! * COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, ! * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, ! * BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; ! * LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER ! * CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT ! * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ! * ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE ! * POSSIBILITY OF SUCH DAMAGE. ! * ! * Visit http://www.olsr.org for more information. ! * ! * If you find this software useful feel free to make a donation ! * to the project. For more information see the website or contact ! * the copyright holders. ! * ! * $Id$ ! */ ! ! #if !defined(AFX_MYEDIT_H__951EC391_AFE3_428F_865D_24CA55C68C7C__INCLUDED_) ! #define AFX_MYEDIT_H__951EC391_AFE3_428F_865D_24CA55C68C7C__INCLUDED_ ! ! #if _MSC_VER > 1000 ! #pragma once ! #endif ! ! class MyEdit : public CEdit ! { ! public: ! ! MyEdit(); ! ! //{{AFX_VIRTUAL(MyEdit) ! //}}AFX_VIRTUAL ! ! virtual ~MyEdit(); ! ! protected: ! //{{AFX_MSG(MyEdit) ! afx_msg void OnChar(UINT nChar, UINT nRepCnt, UINT nFlags); ! afx_msg void OnKillFocus(CWnd* pNewWnd); ! //}}AFX_MSG ! ! DECLARE_MESSAGE_MAP() ! }; ! ! //{{AFX_INSERT_LOCATION}} ! ! #endif Index: MyEdit.cpp =================================================================== RCS file: /cvsroot/olsrd/olsrd-current/gui/win32/Main/MyEdit.cpp,v retrieving revision 1.3 retrieving revision 1.4 diff -C2 -d -r1.3 -r1.4 *** MyEdit.cpp 21 Nov 2004 01:21:10 -0000 1.3 --- MyEdit.cpp 27 Mar 2007 03:01:06 -0000 1.4 *************** *** 1,117 **** ! /* ! * The olsr.org Optimized Link-State Routing daemon (olsrd) ! * Copyright (c) 2004, Thomas Lopatic (thomas at lopatic.de) ! * All rights reserved. ! * ! * Redistribution and use in source and binary forms, with or without ! * modification, are permitted provided that the following conditions ! * are met: ! * ! * * Redistributions of source code must retain the above copyright ! * notice, this list of conditions and the following disclaimer. ! * * Redistributions in binary form must reproduce the above copyright ! * notice, this list of conditions and the following disclaimer in ! * the documentation and/or other materials provided with the ! * distribution. ! * * Neither the name of olsr.org, olsrd nor the names of its ! * contributors may be used to endorse or promote products derived ! * from this software without specific prior written permission. ! * ! * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS ! * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT ! * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS ! * FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE ! * COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, ! * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, ! * BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; ! * LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER ! * CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT ! * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ! * ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE ! * POSSIBILITY OF SUCH DAMAGE. ! * ! * Visit http://www.olsr.org for more information. ! * ! * If you find this software useful feel free to make a donation ! * to the project. For more information see the website or contact ! * the copyright holders. ! * ! * $Id$ ! */ ! ! #include "stdafx.h" ! #include "frontend.h" ! #include "MyEdit.h" ! ! #ifdef _DEBUG ! #define new DEBUG_NEW ! #undef THIS_FILE ! static char THIS_FILE[] = __FILE__; ! #endif ! ! MyEdit::MyEdit() ! { ! } ! ! MyEdit::~MyEdit() ! { ! } ! ! ! BEGIN_MESSAGE_MAP(MyEdit, CEdit) ! //{{AFX_MSG_MAP(MyEdit) ! ON_WM_CHAR() ! ON_WM_KILLFOCUS() ! //}}AFX_MSG_MAP ! END_MESSAGE_MAP() ! ! void MyEdit::OnChar(UINT nChar, UINT nRepCnt, UINT nFlags) ! { ! static unsigned char *Allowed = (unsigned char *)"0123456789."; ! int i; ! CString Text; ! ! if (nChar >= 32) ! { ! for (i = 0; Allowed[i] != 0; i++) ! if (nChar == Allowed[i]) ! break; ! ! if (Allowed[i] == 0) ! return; ! ! GetWindowText(Text); ! ! if (nChar == '.' && Text.Find('.') >= 0) ! return; ! ! if (Text.GetLength() > 2 && Text.Find('.') < 0 && nChar != '.') ! return; ! } ! ! CEdit::OnChar(nChar, nRepCnt, nFlags); ! } ! ! void MyEdit::OnKillFocus(CWnd* pNewWnd) ! { ! CString Text; ! int Index; ! int Len; ! ! GetWindowText(Text); ! ! Index = Text.Find('.'); ! ! Len = Text.GetLength(); ! ! if (Len == 0) ! SetWindowText("0.0"); ! ! else if (Index < 0) ! SetWindowText(Text + ".0"); ! ! else if (Index == Len - 1) ! SetWindowText(Text + "0"); ! ! CEdit::OnKillFocus(pNewWnd); ! } --- 1,117 ---- ! /* ! * The olsr.org Optimized Link-State Routing daemon (olsrd) ! * Copyright (c) 2004, Thomas Lopatic (thomas at lopatic.de) ! * All rights reserved. ! * ! * Redistribution and use in source and binary forms, with or without ! * modification, are permitted provided that the following conditions ! * are met: ! * ! * * Redistributions of source code must retain the above copyright ! * notice, this list of conditions and the following disclaimer. ! * * Redistributions in binary form must reproduce the above copyright ! * notice, this list of conditions and the following disclaimer in ! * the documentation and/or other materials provided with the ! * distribution. ! * * Neither the name of olsr.org, olsrd nor the names of its ! * contributors may be used to endorse or promote products derived ! * from this software without specific prior written permission. ! * ! * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS ! * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT ! * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS ! * FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE ! * COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, ! * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, ! * BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; ! * LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER ! * CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT ! * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ! * ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE ! * POSSIBILITY OF SUCH DAMAGE. ! * ! * Visit http://www.olsr.org for more information. ! * ! * If you find this software useful feel free to make a donation ! * to the project. For more information see the website or contact ! * the copyright holders. ! * ! * $Id$ ! */ ! ! #include "stdafx.h" ! #include "frontend.h" ! #include "MyEdit.h" ! ! #ifdef _DEBUG ! #define new DEBUG_NEW ! #undef THIS_FILE ! static char THIS_FILE[] = __FILE__; ! #endif ! ! MyEdit::MyEdit() ! { ! } ! ! MyEdit::~MyEdit() ! { ! } ! ! ! BEGIN_MESSAGE_MAP(MyEdit, CEdit) ! //{{AFX_MSG_MAP(MyEdit) ! ON_WM_CHAR() ! ON_WM_KILLFOCUS() ! //}}AFX_MSG_MAP ! END_MESSAGE_MAP() ! ! void MyEdit::OnChar(UINT nChar, UINT nRepCnt, UINT nFlags) ! { ! static unsigned char *Allowed = (unsigned char *)"0123456789."; ! int i; ! CString Text; ! ! if (nChar >= 32) ! { ! for (i = 0; Allowed[i] != 0; i++) ! if (nChar == Allowed[i]) ! break; ! ! if (Allowed[i] == 0) ! return; ! ! GetWindowText(Text); ! ! if (nChar == '.' && Text.Find('.') >= 0) ! return; ! ! if (Text.GetLength() > 2 && Text.Find('.') < 0 && nChar != '.') ! return; ! } ! ! CEdit::OnChar(nChar, nRepCnt, nFlags); ! } ! ! void MyEdit::OnKillFocus(CWnd* pNewWnd) ! { ! CString Text; ! int Index; ! int Len; ! ! GetWindowText(Text); ! ! Index = Text.Find('.'); ! ! Len = Text.GetLength(); ! ! if (Len == 0) ! SetWindowText("0.0"); ! ! else if (Index < 0) ! SetWindowText(Text + ".0"); ! ! else if (Index == Len - 1) ! SetWindowText(Text + "0"); ! ! CEdit::OnKillFocus(pNewWnd); ! } --- Frontend.clw DELETED --- Index: resource.h =================================================================== RCS file: /cvsroot/olsrd/olsrd-current/gui/win32/Main/resource.h,v retrieving revision 1.6 retrieving revision 1.7 diff -C2 -d -r1.6 -r1.7 *** resource.h 2 Mar 2005 00:13:23 -0000 1.6 --- resource.h 27 Mar 2007 03:01:07 -0000 1.7 *************** *** 1,67 **** ! //{{NO_DEPENDENCIES}} ! // Microsoft Developer Studio generated include file. ! // Used by Frontend.rc ! // ! #define IDD_FRONTEND_DIALOG 102 ! #define IDP_SOCKETS_INIT_FAILED 103 ! #define IDR_MAINFRAME 128 ! #define IDD_DIALOG1 129 ! #define IDD_DIALOG2 130 ! #define IDD_DIALOG3 131 ! #define IDD_DIALOG4 132 ! #define IDI_ICON1 132 ! #define IDR_241 138 ! #define IDI_ICON3 141 ! #define IDR_TRAYMENU 141 ! #define IDI_ICON2 142 ! #define IDC_TAB1 1000 ! #define IDC_BUTTON1 1001 ! #define IDC_EDIT1 1003 ! #define IDC_BUTTON2 1004 ! #define IDC_EDIT2 1004 ! #define IDC_EDIT3 1005 ! #define IDC_BUTTON3 1006 ! #define IDC_EDIT4 1006 ! #define IDC_EDIT5 1007 ! #define IDC_LIST1 1008 ! #define IDC_SLIDER2 1009 ! #define IDC_TEXT1 1010 ! #define IDC_EDIT6 1011 ! #define IDC_EDIT7 1012 ! #define IDC_CHECK1 1013 ! #define IDC_CHECK2 1014 ! #define IDC_EDIT9 1015 ! #define IDC_CHECK3 1016 ! #define IDC_BUTTON4 1017 ! #define IDC_BUTTON5 1018 ! #define IDC_CHECK4 1019 ! #define IDC_EDIT10 1020 ! #define IDC_EDIT11 1021 ! #define IDC_EDIT8 1022 ! #define IDC_EDIT12 1023 ! #define IDC_EDIT13 1024 ! #define IDC_LIST4 1025 ! #define IDC_EDIT14 1025 ! #define IDC_LIST5 1026 ! #define IDC_EDIT15 1026 ! #define IDC_LIST6 1027 ! #define IDC_RADIO1 1029 ! #define IDC_RADIO2 1030 ! #define IDC_COMBO1 1031 ! #define IDM_START 32773 ! #define IDM_STOP 32774 ! #define IDM_WINDOW 32775 ! #define IDM_SETTINGS 32776 ! #define IDM_OUTPUT 32777 ! #define IDM_EXIT 32778 ! ! // Next default values for new objects ! // ! #ifdef APSTUDIO_INVOKED ! #ifndef APSTUDIO_READONLY_SYMBOLS ! #define _APS_NEXT_RESOURCE_VALUE 142 ! #define _APS_NEXT_COMMAND_VALUE 32779 ! #define _APS_NEXT_CONTROL_VALUE 1032 ! #define _APS_NEXT_SYMED_VALUE 101 ! #endif ! #endif --- 1,68 ---- ! //{{NO_DEPENDENCIES}} ! // Microsoft Visual C++ generated include file. ! // Used by Frontend.rc ! // ! #define IDD_FRONTEND_DIALOG 102 ! #define IDP_SOCKETS_INIT_FAILED 103 ! #define IDR_MAINFRAME 128 ! #define IDD_DIALOG1 129 ! #define IDD_DIALOG2 130 ! #define IDD_DIALOG3 131 ! #define IDD_DIALOG4 132 ! #define IDI_ICON1 132 ! #define IDR_241 138 ! #define IDI_ICON3 141 ! #define IDR_TRAYMENU 141 ! #define IDI_ICON2 142 ! #define IDC_TAB1 1000 ! #define IDC_BUTTON1 1001 ! #define IDC_EDIT1 1003 ! #define IDC_BUTTON2 1004 ! #define IDC_EDIT2 1004 ! #define IDC_EDIT3 1005 ! #define IDC_BUTTON3 1006 ! #define IDC_EDIT4 1006 ! #define IDC_EDIT5 1007 ! #define IDC_LIST1 1008 ! #define IDC_SLIDER2 1009 ! #define IDC_TEXT1 1010 ! #define IDC_EDIT6 1011 ! #define IDC_EDIT7 1012 ! #define IDC_CHECK1 1013 ! #define IDC_CHECK2 1014 ! #define IDC_EDIT9 1015 ! #define IDC_CHECK3 1016 ! #define IDC_BUTTON4 1017 ! #define IDC_BUTTON5 1018 ! #define IDC_CHECK4 1019 ! #define IDC_EDIT10 1020 ! #define IDC_EDIT11 1021 ! #define IDC_EDIT8 1022 ! #define IDC_CHECK5 1022 ! #define IDC_EDIT12 1023 ! #define IDC_EDIT13 1024 ! #define IDC_LIST4 1025 ! #define IDC_EDIT14 1025 ! #define IDC_LIST5 1026 ! #define IDC_EDIT15 1026 ! #define IDC_LIST6 1027 ! #define IDC_RADIO1 1029 ! #define IDC_RADIO2 1030 ! #define IDC_COMBO1 1031 ! #define IDM_START 32773 ! #define IDM_STOP 32774 ! #define IDM_WINDOW 32775 ! #define IDM_SETTINGS 32776 ! #define IDM_OUTPUT 32777 ! #define IDM_EXIT 32778 ! ! // Next default values for new objects ! // ! #ifdef APSTUDIO_INVOKED ! #ifndef APSTUDIO_READONLY_SYMBOLS ! #define _APS_NEXT_RESOURCE_VALUE 142 ! #define _APS_NEXT_COMMAND_VALUE 32779 ! #define _APS_NEXT_CONTROL_VALUE 1032 ! #define _APS_NEXT_SYMED_VALUE 101 ! #endif ! #endif --- NEW FILE: Main.vcproj --- Index: MyDialog4.cpp =================================================================== RCS file: /cvsroot/olsrd/olsrd-current/gui/win32/Main/MyDialog4.cpp,v retrieving revision 1.3 retrieving revision 1.4 diff -C2 -d -r1.3 -r1.4 *** MyDialog4.cpp 21 Nov 2004 01:21:10 -0000 1.3 --- MyDialog4.cpp 27 Mar 2007 03:01:06 -0000 1.4 *************** *** 1,155 **** ! /* ! * The olsr.org Optimized Link-State Routing daemon (olsrd) ! * Copyright (c) 2004, Thomas Lopatic (thomas at lopatic.de) ! * All rights reserved. ! * ! * Redistribution and use in source and binary forms, with or without ! * modification, are permitted provided that the following conditions ! * are met: ! * ! * * Redistributions of source code must retain the above copyright ! * notice, this list of conditions and the following disclaimer. ! * * Redistributions in binary form must reproduce the above copyright ! * notice, this list of conditions and the following disclaimer in ! * the documentation and/or other materials provided with the ! * distribution. ! * * Neither the name of olsr.org, olsrd nor the names of its ! * contributors may be used to endorse or promote products derived ! * from this software without specific prior written permission. ! * ! * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS ! * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT ! * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS ! * FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE ! * COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, ! * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, ! * BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; ! * LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER ! * CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT ! * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ! * ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE ! * POSSIBILITY OF SUCH DAMAGE. ! * ! * Visit http://www.olsr.org for more information. ! * ! * If you find this software useful feel free to make a donation ! * to the project. For more information see the website or contact ! * the copyright holders. ! * ! * $Id$ ! */ ! ! #include "stdafx.h" ! #include "Frontend.h" ! #include "MyDialog4.h" ! ! #ifdef _DEBUG ! #define new DEBUG_NEW ! #undef THIS_FILE ! static char THIS_FILE[] = __FILE__; ! #endif ! ! MyDialog4::MyDialog4(CWnd* pParent) ! : CDialog(MyDialog4::IDD, pParent) ! { ! //{{AFX_DATA_INIT(MyDialog4) ! //}}AFX_DATA_INIT ! } ! ! BOOL MyDialog4::Create(CWnd *Parent) ! { ! return CDialog::Create(MyDialog4::IDD, Parent); ! } ! ! void MyDialog4::DoDataExchange(CDataExchange* pDX) ! { ! CDialog::DoDataExchange(pDX); ! //{{AFX_DATA_MAP(MyDialog4) ! DDX_Control(pDX, IDC_LIST1, m_RoutingTable); ! //}}AFX_DATA_MAP ! } ! ! ! BEGIN_MESSAGE_MAP(MyDialog4, CDialog) ! //{{AFX_MSG_MAP(MyDialog4) ! ON_BN_CLICKED(IDOK, OnOK) ! ON_BN_CLICKED(IDCANCEL, OnCancel) ! //}}AFX_MSG_MAP ! END_MESSAGE_MAP() ! ! void MyDialog4::OnOK() ! { ! } ! ! void MyDialog4::OnCancel() ! { ! } ! ! BOOL MyDialog4::OnInitDialog() ! { ! CDialog::OnInitDialog(); ! ! m_RoutingTable.InsertColumn(0, "Destination", LVCFMT_LEFT, 110, 0); ! m_RoutingTable.InsertColumn(1, "Gateway", LVCFMT_LEFT, 110, 1); ! m_RoutingTable.InsertColumn(2, "Metric", LVCFMT_LEFT, 68, 2); ! m_RoutingTable.InsertColumn(3, "Interface", LVCFMT_LEFT, 67, 3); ! ! return TRUE; ! } ! ! void MyDialog4::AddRoute(unsigned int Dest, unsigned int Gate, int Metric, ! char *Int) ! { ! CString DestStr; ! CString GateStr; ! CString MetricStr; ! CString IntStr; ! int Idx; ! ! DestStr.Format("%d.%d.%d.%d", ! ((unsigned char *)&Dest)[0], ((unsigned char *)&Dest)[1], ! ((unsigned char *)&Dest)[2], ((unsigned char *)&Dest)[3]); ! ! GateStr.Format("%d.%d.%d.%d", ! ((unsigned char *)&Gate)[0], ((unsigned char *)&Gate)[1], ! ((unsigned char *)&Gate)[2], ((unsigned char *)&Gate)[3]); ! ! MetricStr.Format("%d", Metric); ! ! IntStr.Format("%c%c%c%c", Int[0], Int[1], Int[2], Int[3]); ! IntStr.MakeUpper(); ! ! Idx = m_RoutingTable.GetItemCount(); ! ! m_RoutingTable.InsertItem(Idx, DestStr); ! ! m_RoutingTable.SetItemText(Idx, 1, GateStr); ! m_RoutingTable.SetItemText(Idx, 2, MetricStr); ! m_RoutingTable.SetItemText(Idx, 3, IntStr); ! } ! ! void MyDialog4::DeleteRoute(unsigned int Dest) ! { ! CString DestStr; ! int Idx, Num; ! ! DestStr.Format("%d.%d.%d.%d", ! ((unsigned char *)&Dest)[0], ((unsigned char *)&Dest)[1], ! ((unsigned char *)&Dest)[2], ((unsigned char *)&Dest)[3]); ! ! Num = m_RoutingTable.GetItemCount(); ! ! for (Idx = 0; Idx < Num; Idx++) ! { ! if (m_RoutingTable.GetItemText(Idx, 0) == DestStr) ! { ! m_RoutingTable.DeleteItem(Idx); ! break; ! } ! } ! } ! ! void MyDialog4::ClearRoutes(void) ! { ! m_RoutingTable.DeleteAllItems(); ! } --- 1,155 ---- ! /* ! * The olsr.org Optimized Link-State Routing daemon (olsrd) ! * Copyright (c) 2004, Thomas Lopatic (thomas at lopatic.de) ! * All rights reserved. ! * ! * Redistribution and use in source and binary forms, with or without ! * modification, are permitted provided that the following conditions ! * are met: ! * ! * * Redistributions of source code must retain the above copyright ! * notice, this list of conditions and the following disclaimer. ! * * Redistributions in binary form must reproduce the above copyright ! * notice, this list of conditions and the following disclaimer in ! * the documentation and/or other materials provided with the ! * distribution. ! * * Neither the name of olsr.org, olsrd nor the names of its ! * contributors may be used to endorse or promote products derived ! * from this software without specific prior written permission. ! * ! * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS ! * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT ! * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS ! * FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE ! * COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, ! * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, ! * BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; ! * LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER ! * CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT ! * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ! * ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE ! * POSSIBILITY OF SUCH DAMAGE. ! * ! * Visit http://www.olsr.org for more information. ! * ! * If you find this software useful feel free to make a donation ! * to the project. For more information see the website or contact ! * the copyright holders. ! * ! * $Id$ ! */ ! ! #include "stdafx.h" ! #include "Frontend.h" ! #include "MyDialog4.h" ! ! #ifdef _DEBUG ! #define new DEBUG_NEW ! #undef THIS_FILE ! static char THIS_FILE[] = __FILE__; ! #endif ! ! MyDialog4::MyDialog4(CWnd* pParent) ! : CDialog(MyDialog4::IDD, pParent) ! { ! //{{AFX_DATA_INIT(MyDialog4) ! //}}AFX_DATA_INIT ! } ! ! BOOL MyDialog4::Create(CWnd *Parent) ! { ! return CDialog::Create(MyDialog4::IDD, Parent); ! } ! ! void MyDialog4::DoDataExchange(CDataExchange* pDX) ! { ! CDialog::DoDataExchange(pDX); ! //{{AFX_DATA_MAP(MyDialog4) ! DDX_Control(pDX, IDC_LIST1, m_RoutingTable); ! //}}AFX_DATA_MAP ! } ! ! ! BEGIN_MESSAGE_MAP(MyDialog4, CDialog) ! //{{AFX_MSG_MAP(MyDialog4) ! ON_BN_CLICKED(IDOK, OnOK) ! ON_BN_CLICKED(IDCANCEL, OnCancel) ! //}}AFX_MSG_MAP ! END_MESSAGE_MAP() ! ! void MyDialog4::OnOK() ! { ! } ! ! void MyDialog4::OnCancel() ! { ! } ! ! BOOL MyDialog4::OnInitDialog() ! { ! CDialog::OnInitDialog(); ! ! m_RoutingTable.InsertColumn(0, "Destination", LVCFMT_LEFT, 110, 0); ! m_RoutingTable.InsertColumn(1, "Gateway", LVCFMT_LEFT, 110, 1); ! m_RoutingTable.InsertColumn(2, "Metric", LVCFMT_LEFT, 68, 2); ! m_RoutingTable.InsertColumn(3, "Interface", LVCFMT_LEFT, 67, 3); ! ! return TRUE; ! } ! ! void MyDialog4::AddRoute(unsigned int Dest, unsigned int Gate, int Metric, ! char *Int) ! { ! CString DestStr; ! CString GateStr; ! CString MetricStr; ! CString IntStr; ! int Idx; ! ! DestStr.Format("%d.%d.%d.%d", ! ((unsigned char *)&Dest)[0], ((unsigned char *)&Dest)[1], ! ((unsigned char *)&Dest)[2], ((unsigned char *)&Dest)[3]); ! ! GateStr.Format("%d.%d.%d.%d", ! ((unsigned char *)&Gate)[0], ((unsigned char *)&Gate)[1], ! ((unsigned char *)&Gate)[2], ((unsigned char *)&Gate)[3]); ! ! MetricStr.Format("%d", Metric); ! ! IntStr.Format("%c%c%c%c", Int[0], Int[1], Int[2], Int[3]); ! IntStr.MakeUpper(); ! ! Idx = m_RoutingTable.GetItemCount(); ! ! m_RoutingTable.InsertItem(Idx, DestStr); ! ! m_RoutingTable.SetItemText(Idx, 1, GateStr); ! m_RoutingTable.SetItemText(Idx, 2, MetricStr); ! m_RoutingTable.SetItemText(Idx, 3, IntStr); ! } ! ! void MyDialog4::DeleteRoute(unsigned int Dest) ! { ! CString DestStr; ! int Idx, Num; ! ! DestStr.Format("%d.%d.%d.%d", ! ((unsigned char *)&Dest)[0], ((unsigned char *)&Dest)[1], ! ((unsigned char *)&Dest)[2], ((unsigned char *)&Dest)[3]); ! ! Num = m_RoutingTable.GetItemCount(); ! ! for (Idx = 0; Idx < Num; Idx++) ! { ! if (m_RoutingTable.GetItemText(Idx, 0) == DestStr) ! { ! m_RoutingTable.DeleteItem(Idx); ! break; ! } ! } ! } ! ! void MyDialog4::ClearRoutes(void) ! { ! m_RoutingTable.DeleteAllItems(); ! } Index: MyDialog1.h =================================================================== RCS file: /cvsroot/olsrd/olsrd-current/gui/win32/Main/MyDialog1.h,v retrieving revision 1.5 retrieving revision 1.6 diff -C2 -d -r1.5 -r1.6 *** MyDialog1.h 21 Nov 2004 01:21:10 -0000 1.5 --- MyDialog1.h 27 Mar 2007 03:01:06 -0000 1.6 *************** *** 1,102 **** ! /* ! * The olsr.org Optimized Link-State Routing daemon (olsrd) ! * Copyright (c) 2004, Thomas Lopatic (thomas at lopatic.de) ! * All rights reserved. ! * ! * Redistribution and use in source and binary forms, with or without ! * modification, are permitted provided that the following conditions ! * are met: ! * ! * * Redistributions of source code must retain the above copyright ! * notice, this list of conditions and the following disclaimer. ! * * Redistributions in binary form must reproduce the above copyright ! * notice, this list of conditions and the following disclaimer in ! * the documentation and/or other materials provided with the ! * distribution. ! * * Neither the name of olsr.org, olsrd nor the names of its ! * contributors may be used to endorse or promote products derived ! * from this software without specific prior written permission. ! * ! * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS ! * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT ! * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS ! * FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE ! * COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, ! * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, ! * BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; ! * LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER ! * CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT ! * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ! * ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE ! * POSSIBILITY OF SUCH DAMAGE. ! * ! * Visit http://www.olsr.org for more information. ! * ! * If you find this software useful feel free to make a donation ! * to the project. For more information see the website or contact ! * the copyright holders. ! * ! * $Id$ ! */ ! ! #if !defined(AFX_MYDIALOG1_H__1A381668_A36B_4C51_9B79_643BC2A59D88__INCLUDED_) ! #define AFX_MYDIALOG1_H__1A381668_A36B_4C51_9B79_643BC2A59D88__INCLUDED_ ! ! #if _MSC_VER > 1000 ! #pragma once ! #endif ! ! class MyDialog1 : public CDialog ! { ! public: ! MyDialog1(CWnd* pParent = NULL); ! ! BOOL Create(CWnd *Parent); ! ! void AddOutputLine(CString); ! void SetFrozen(int); ! void HandleStart(void); ! void HandleStop(void); ! ! //{{AFX_DATA(MyDialog1) ! enum { IDD = IDD_DIALOG1 }; ! CButton m_SaveButton; ! CButton m_FreezeButton; ! CButton m_ContinueButton; ! CButton m_ClearButton; ! CEdit m_OutputWindow; ! //}}AFX_DATA ! ! ! //{{AFX_VIRTUAL(MyDialog1) ! protected: ! virtual void DoDataExchange(CDataExchange* pDX); ! //}}AFX_VIRTUAL ! ! protected: ! ! //{{AFX_MSG(MyDialog1) ! afx_msg void OnOK(); ! afx_msg void OnCancel(); ! virtual BOOL OnInitDialog(); ! afx_msg void OnClearButton(); ! afx_msg void OnContinueButton(); ! afx_msg void OnFreezeButton(); ! afx_msg HBRUSH OnCtlColor(CDC* pDC, CWnd* pWnd, UINT nCtlColor); ! afx_msg void OnSaveButton(); ! //}}AFX_MSG ! DECLARE_MESSAGE_MAP() ! ! CCriticalSection CritSect; ! CString Output; ! int NumLines; ! ! int Frozen; ! ! CFont EditFont; ! CBrush WhiteBrush; ! }; ! ! //{{AFX_INSERT_LOCATION}} ! ! #endif --- 1,102 ---- ! /* ! * The olsr.org Optimized Link-State Routing daemon (olsrd) ! * Copyright (c) 2004, Thomas Lopatic (thomas at lopatic.de) ! * All rights reserved. ! * ! * Redistribution and use in source and binary forms, with or without ! * modification, are permitted provided that the following conditions ! * are met: ! * ! * * Redistributions of source code must retain the above copyright ! * notice, this list of conditions and the following disclaimer. ! * * Redistributions in binary form must reproduce the above copyright ! * notice, this list of conditions and the following disclaimer in ! * the documentation and/or other materials provided with the ! * distribution. ! * * Neither the name of olsr.org, olsrd nor the names of its ! * contributors may be used to endorse or promote products derived ! * from this software without specific prior written permission. ! * ! * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS ! * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT ! * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS ! * FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE ! * COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, ! * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, ! * BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; ! * LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER ! * CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT ! * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ! * ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE ! * POSSIBILITY OF SUCH DAMAGE. ! * ! * Visit http://www.olsr.org for more information. ! * ! * If you find this software useful feel free to make a donation ! * to the project. For more information see the website or contact ! * the copyright holders. ! * ! * $Id$ ! */ ! ! #if !defined(AFX_MYDIALOG1_H__1A381668_A36B_4C51_9B79_643BC2A59D88__INCLUDED_) ! #define AFX_MYDIALOG1_H__1A381668_A36B_4C51_9B79_643BC2A59D88__INCLUDED_ ! ! #if _MSC_VER > 1000 ! #pragma once ! #endif ! ! class MyDialog1 : public CDialog ! { ! public: ! MyDialog1(CWnd* pParent = NULL); ! ! BOOL Create(CWnd *Parent); ! ! void AddOutputLine(CString); ! void SetFrozen(int); ! void HandleStart(void); ! void HandleStop(void); ! ! //{{AFX_DATA(MyDialog1) ! enum { IDD = IDD_DIALOG1 }; ! CButton m_SaveButton; ! CButton m_FreezeButton; ! CButton m_ContinueButton; ! CButton m_ClearButton; ! CEdit m_OutputWindow; ! //}}AFX_DATA ! ! ! //{{AFX_VIRTUAL(MyDialog1) ! protected: ! virtual void DoDataExchange(CDataExchange* pDX); ! //}}AFX_VIRTUAL ! ! protected: ! ! //{{AFX_MSG(MyDialog1) ! afx_msg void OnOK(); ! afx_msg void OnCancel(); ! virtual BOOL OnInitDialog(); ! afx_msg void OnClearButton(); ! afx_msg void OnContinueButton(); ! afx_msg void OnFreezeButton(); ! afx_msg HBRUSH OnCtlColor(CDC* pDC, CWnd* pWnd, UINT nCtlColor); ! afx_msg void OnSaveButton(); ! //}}AFX_MSG ! DECLARE_MESSAGE_MAP() ! ! CCriticalSection CritSect; ! CString Output; ! int NumLines; ! ! int Frozen; ! ! CFont EditFont; ! CBrush WhiteBrush; ! }; ! ! //{{AFX_INSERT_LOCATION}} ! ! #endif Index: MprEntry.h =================================================================== RCS file: /cvsroot/olsrd/olsrd-current/gui/win32/Main/MprEntry.h,v retrieving revision 1.3 retrieving revision 1.4 diff -C2 -d -r1.3 -r1.4 *** MprEntry.h 21 Nov 2004 01:21:10 -0000 1.3 --- MprEntry.h 27 Mar 2007 03:01:06 -0000 1.4 *************** *** 1,55 **** ! /* ! * The olsr.org Optimized Link-State Routing daemon (olsrd) ! * Copyright (c) 2004, Thomas Lopatic (thomas at lopatic.de) ! * All rights reserved. ! * ! * Redistribution and use in source and binary forms, with or without ! * modification, are permitted provided that the following conditions ! * are met: ! * ! * * Redistributions of source code must retain the above copyright ! * notice, this list of conditions and the following disclaimer. ! * * Redistributions in binary form must reproduce the above copyright ! * notice, this list of conditions and the following disclaimer in ! * the documentation and/or other materials provided with the ! * distribution. ! * * Neither the name of olsr.org, olsrd nor the names of its ! * contributors may be used to endorse or promote products derived ! * from this software without specific prior written permission. ! * ! * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS ! * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT ! * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS ! * FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE ! * COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, ! * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, ! * BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; ! * LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER ! * CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT ! * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ! * ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE ! * POSSIBILITY OF SUCH DAMAGE. ! * ! * Visit http://www.olsr.org for more information. ! * ! * If you find this software useful feel free to make a donation ! * to the project. For more information see the website or contact ! * the copyright holders. ! * ! * $Id$ ! */ ! ! #if !defined TL_MPRENTRY_H ! #define TL_MPRENTRY_H ! ! class MprEntry ! { ! public: ! unsigned int Addr; ! unsigned __int64 Timeout; ! ! class MprEntry &MprEntry::operator=(class MprEntry &); ! BOOL MprEntry::operator==(const class MprEntry &) const; ! }; ! ! #endif --- 1,55 ---- ! /* ! * The olsr.org Optimized Link-State Routing daemon (olsrd) ! * Copyright (c) 2004, Thomas Lopatic (thomas at lopatic.de) ! * All rights reserved. ! * ! * Redistribution and use in source and binary forms, with or without ! * modification, are permitted provided that the following conditions ! * are met: ! * ! * * Redistributions of source code must retain the above copyright ! * notice, this list of conditions and the following disclaimer. ! * * Redistributions in binary form must reproduce the above copyright ! * notice, this list of conditions and the following disclaimer in ! * the documentation and/or other materials provided with the ! * distribution. ! * * Neither the name of olsr.org, olsrd nor the names of its ! * contributors may be used to endorse or promote products derived ! * from this software without specific prior written permission. ! * ! * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS ! * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT ! * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS ! * FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE ! * COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, ! * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, ! * BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; ! * LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER ! * CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT ! * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ! * ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE ! * POSSIBILITY OF SUCH DAMAGE. ! * ! * Visit http://www.olsr.org for more information. ! * ! * If you find this software useful feel free to make a donation ! * to the project. For more information see the website or contact ! * the copyright holders. ! * ! * $Id$ ! */ ! ! #if !defined TL_MPRENTRY_H ! #define TL_MPRENTRY_H ! ! class MprEntry ! { ! public: ! unsigned int Addr; ! unsigned __int64 Timeout; ! ! class MprEntry &MprEntry::operator=(class MprEntry &); ! BOOL MprEntry::operator==(const class MprEntry &) const; ! }; ! ! #endif Index: MidEntry.h =================================================================== RCS file: /cvsroot/olsrd/olsrd-current/gui/win32/Main/MidEntry.h,v retrieving revision 1.3 retrieving revision 1.4 diff -C2 -d -r1.3 -r1.4 *** MidEntry.h 21 Nov 2004 01:21:10 -0000 1.3 --- MidEntry.h 27 Mar 2007 03:01:06 -0000 1.4 *************** *** 1,55 **** ! /* ! * The olsr.org Optimized Link-State Routing daemon (olsrd) ! * Copyright (c) 2004, Thomas Lopatic (thomas at lopatic.de) ! * All rights reserved. ! * ! * Redistribution and use in source and binary forms, with or without ! * modification, are permitted provided that the following conditions ! * are met: ! * ! * * Redistributions of source code must retain the above copyright ! * notice, this list of conditions and the following disclaimer. ! * * Redistributions in binary form must reproduce the above copyright ! * notice, this list of conditions and the following disclaimer in ! * the documentation and/or other materials provided with the ! * distribution. ! * * Neither the name of olsr.org, olsrd nor the names of its ! * contributors may be used to endorse or promote products derived ! * from this software without specific prior written permission. ! * ! * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS ! * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT ! * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS ! * FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE ! * COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, ! * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, ! * BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; ! * LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER ! * CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT ! * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ! * ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE ! * POSSIBILITY OF SUCH DAMAGE. ! * ! * Visit http://www.olsr.org for more information. ! * ! * If you find this software useful feel free to make a donation ! * to the project. For more information see the website or contact ! * the copyright holders. ! * ! * $Id$ ! */ ! ! #if !defined TL_MIDENTRY_H ! #define TL_MIDENTRY_H ! ! class MidEntry ! { ! public: ! unsigned int Addr; ! unsigned __int64 Timeout; ! ! class MidEntry &MidEntry::operator=(class MidEntry &); ! BOOL MidEntry::operator==(const class MidEntry &) const; ! }; ! ! #endif --- 1,55 ---- ! /* ! * The olsr.org Optimized Link-State Routing daemon (olsrd) ! * Copyright (c) 2004, Thomas Lopatic (thomas at lopatic.de) ! * All rights reserved. ! * ! * Redistribution and use in source and binary forms, with or without ! * modification, are permitted provided that the following conditions ! * are met: ! * ! * * Redistributions of source code must retain the above copyright ! * notice, this list of conditions and the following disclaimer. ! * * Redistributions in binary form must reproduce the above copyright ! * notice, this list of conditions and the following disclaimer in ! * the documentation and/or other materials provided with the ! * distribution. ! * * Neither the name of olsr.org, olsrd nor the names of its ! * contributors may be used to endorse or promote products derived ! * from this software without specific prior written permission. ! * ! * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS ! * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT ! * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS ! * FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE ! * COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, ! * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, ! * BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; ! * LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER ! * CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT ! * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ! * ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE ! * POSSIBILITY OF SUCH DAMAGE. ! * ! * Visit http://www.olsr.org for more information. ! * ! * If you find this software useful feel free to make a donation ! * to the project. For more information see the website or contact ! * the copyright holders. ! * ! * $Id$ ! */ ! ! #if !defined TL_MIDENTRY_H ! #define TL_MIDENTRY_H ! ! class MidEntry ! { ! public: ! unsigned int Addr; ! unsigned __int64 Timeout; ! ! class MidEntry &MidEntry::operator=(class MidEntry &); ! BOOL MidEntry::operator==(const class MidEntry &) const; ! }; ! ! #endif Index: MprEntry.cpp =================================================================== RCS file: /cvsroot/olsrd/olsrd-current/gui/win32/Main/MprEntry.cpp,v retrieving revision 1.3 retrieving revision 1.4 diff -C2 -d -r1.3 -r1.4 *** MprEntry.cpp 21 Nov 2004 01:21:10 -0000 1.3 --- MprEntry.cpp 27 Mar 2007 03:01:06 -0000 1.4 *************** *** 1,56 **** ! /* ! * The olsr.org Optimized Link-State Routing daemon (olsrd) ! * Copyright (c) 2004, Thomas Lopatic (thomas at lopatic.de) ! * All rights reserved. ! * ! * Redistribution and use in source and binary forms, with or without ! * modification, are permitted provided that the following conditions ! * are met: ! * ! * * Redistributions of source code must retain the above copyright ! * notice, this list of conditions and the following disclaimer. ! * * Redistributions in binary form must reproduce the above copyright ! * notice, this list of conditions and the following disclaimer in ! * the documentation and/or other materials provided with the ! * distribution. ! * * Neither the name of olsr.org, olsrd nor the names of its ! * contributors may be used to endorse or promote products derived ! * from this software without specific prior written permission. ! * ! * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS ! * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT ! * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS ! * FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE ! * COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, ! * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, ! * BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; ! * LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER ! * CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT ! * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ! * ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE ! * POSSIBILITY OF SUCH DAMAGE. ! * ! * Visit http://www.olsr.org for more information. ! * ! * If you find this software useful feel free to make a donation ! * to the project. For more information see the website or contact ! * the copyright holders. ! * ! * $Id$ ! */ ! ! #include "stdafx.h" ! #include "MprEntry.h" ! ! class MprEntry &MprEntry::operator=(class MprEntry &Src) ! { ! Addr = Src.Addr; ! Timeout = Src.Timeout; ! ! return *this; ! } ! ! BOOL MprEntry::operator==(const class MprEntry &Comp) const ! { ! return Addr == Comp.Addr; ! } --- 1,56 ---- ! /* ! * The olsr.org Optimized Link-State Routing daemon (olsrd) ! * Copyright (c) 2004, Thomas Lopatic (thomas at lopatic.de) ! * All rights reserved. ! * ! * Redistribution and use in source and binary forms, with or without ! * modification, are permitted provided that the following conditions ! * are met: ! * ! * * Redistributions of source code must retain the above copyright ! * notice, this list of conditions and the following disclaimer. ! * * Redistributions in binary form must reproduce the above copyright ! * notice, this list of conditions and the following disclaimer in ! * the documentation and/or other materials provided with the ! * distribution. ! * * Neither the name of olsr.org, olsrd nor the names of its ! * contributors may be used to endorse or promote products derived ! * from this software without specific prior written permission. ! * ! * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS ! * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT ! * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS ! * FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE ! * COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, ! * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, ! * BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; ! * LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER ! * CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT ! * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ! * ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE ! * POSSIBILITY OF SUCH DAMAGE. ! * ! * Visit http://www.olsr.org for more information. ! * ! * If you find this software useful feel free to make a donation ! * to the project. For more information see the website or contact ! * the copyright holders. ! * ! * $Id$ ! */ ! ! #include "stdafx.h" ! #include "MprEntry.h" ! ! class MprEntry &MprEntry::operator=(class MprEntry &Src) ! { ! Addr = Src.Addr; ! Timeout = Src.Timeout; ! ! return *this; ! } ! ! BOOL MprEntry::operator==(const class MprEntry &Comp) const ! { ! return Addr == Comp.Addr; ! } Index: NodeEntry.h =================================================================== RCS file: /cvsroot/olsrd/olsrd-current/gui/win32/Main/NodeEntry.h,v retrieving revision 1.3 retrieving revision 1.4 diff -C2 -d -r1.3 -r1.4 *** NodeEntry.h 21 Nov 2004 01:21:10 -0000 1.3 --- NodeEntry.h 27 Mar 2007 03:01:07 -0000 1.4 *************** *** 1,67 **** ! /* ! * The olsr.org Optimized Link-State Routing daemon (olsrd) ! * Copyright (c) 2004, Thomas Lopatic (thomas at lopatic.de) ! * All rights reserved. ! * ! * Redistribution and use in source and binary forms, with or without ! * modification, are permitted provided that the following conditions ! * are met: ! * ! * * Redistributions of source code must retain the above copyright ! * notice, this list of conditions and the following disclaimer. ! * * Redistributions in binary form must reproduce the above copyright ! * notice, this list of conditions and the following disclaimer in ! * the documentation and/or other materials provided with the ! * distribution. ! * * Neither the name of olsr.org, olsrd nor the names of its ! * contributors may be used to endorse or promote products derived ! * from this software without specific prior written permission. ! * ! * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS ! * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT ! * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS ! * FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE ! * COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, ! * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, ! * BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; ! * LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER ! * CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT ! * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ! * ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE ! * POSSIBILITY OF SUCH DAMAGE. ! * ! * Visit http://www.olsr.org for more information. ! * ! * If you find this software useful feel free to make a donation ! * to the project. For more information see the website or contact ! * the copyright holders. ! * ! * $Id$ ! */ ! ! #if !defined TL_NODEENTRY_H ! #define TL_NODEENTRY_H ! ! #include "MprEntry.h" ! #include "MidEntry.h" ! #include "HnaEntry.h" ! ! class NodeEntry ! { ! public: ! unsigned int Addr; ! unsigned __int64 Timeout; ! ! CList MprList; ! CList MidList; ! CList HnaList; ! ! void AddMpr(unsigned int, unsigned __int64); ! void AddMid(unsigned int, unsigned __int64); ! void AddHna(unsigned int, unsigned int, unsigned __int64); ! ! class NodeEntry &NodeEntry::operator=(class NodeEntry &); ! BOOL NodeEntry::operator==(const class NodeEntry &) const; ! }; ! ! #endif --- 1,67 ---- ! /* ! * The olsr.org Optimized Link-State Routing daemon (olsrd) ! * Copyright (c) 2004, Thomas Lopatic (thomas at lopatic.de) ! * All rights reserved. ! * ! * Redistribution and use in source and binary forms, with or without ! * modification, are permitted provided that the following conditions ! * are met: ! * ! * * Redistributions of source code must retain the above copyright ! * notice, this list of conditions and the following disclaimer. ! * * Redistributions in binary form must reproduce the above copyright ! * notice, this list of conditions and the following disclaimer in ! * the documentation and/or other materials provided with the ! * distribution. ! * * Neither the name of olsr.org, olsrd nor the names of its ! * contributors may be used to endorse or promote products derived ! * from this software without specific prior written permission. ! * ! * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS ! * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT ! * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS ! * FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE ! * COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, ! * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, ! * BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; ! * LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER ! * CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT ! * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ! * ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE ! * POSSIBILITY OF SUCH DAMAGE. ! * ! * Visit http://www.olsr.org for more information. ! * ! * If you find this software useful feel free to make a donation ! * to the project. For more information see the website or contact ! * the copyright holders. ! * ! * $Id$ ! */ ! ! #if !defined TL_NODEENTRY_H ! #define TL_NODEENTRY_H ! ! #include "MprEntry.h" ! #include "MidEntry.h" ! #include "HnaEntry.h" ! ! class NodeEntry ! { ! public: ! unsigned int Addr; ! unsigned __int64 Timeout; ! ! CList MprList; ! CList MidList; ! CList HnaList; ! ! void AddMpr(unsigned int, unsigned __int64); ! void AddMid(unsigned int, unsigned __int64); ! void AddHna(unsigned int, unsigned int, unsigned __int64); ! ! class NodeEntry &NodeEntry::operator=(class NodeEntry &); ! BOOL NodeEntry::operator==(const class NodeEntry &) const; ! }; ! ! #endif Index: TrayIcon.cpp =================================================================== RCS file: /cvsroot/olsrd/olsrd-current/gui/win32/Main/TrayIcon.cpp,v retrieving revision 1.3 retrieving revision 1.4 diff -C2 -d -r1.3 -r1.4 *** TrayIcon.cpp 2 Mar 2005 00:40:51 -0000 1.3 --- TrayIcon.cpp 27 Mar 2007 03:01:07 -0000 1.4 *************** *** 1,185 **** ! #include "stdafx.h" ! #include "TrayIcon.h" ! ! #include ! #include ! ! #include "Frontend.h" ! #include "FrontendDlg.h" ! #include "Resource.h" ! ! #define TRAYICONID 987435 ! ! HWND s_hWnd; ! TrayIcon* TrayIcon::instance = NULL; ! ! LRESULT CALLBACK TrayIconProc( HWND, UINT, WPARAM, LPARAM lParam ) ! { ! switch (lParam) ! { ! case WM_LBUTTONDOWN: ! case WM_RBUTTONDOWN: ! TrayIcon::instance->displayPopup(); ! break; ! } ! ! return 1; ! } ! ! void TrayIcon::displayPopup() ! { ! HMENU hMenu = LoadMenu(AfxGetInstanceHandle(), MAKEINTRESOURCE(IDR_TRAYMENU)); ! HMENU hSubMenu = GetSubMenu(hMenu, 0); ! ! EnableMenuItem(hSubMenu, IDM_STOP, ! MF_BYCOMMAND | (main_dlg.m_StopButton.IsWindowEnabled() ? MF_ENABLED : MF_GRAYED)); ! ! EnableMenuItem(hSubMenu, IDM_START, ! MF_BYCOMMAND | (main_dlg.m_StartButton.IsWindowEnabled() ? MF_ENABLED : MF_GRAYED)); ! ! POINT pt; ! ! GetCursorPos(&pt); ! ! SetForegroundWindow( s_hWnd ); ! ! int cmd = TrackPopupMenu(hSubMenu, ! TPM_RIGHTBUTTON | TPM_RETURNCMD, ! pt.x, ! pt.y, ! 0, ! s_hWnd, ! NULL); ! ! PostMessage(s_hWnd, WM_NULL, 0, 0); ! ! switch(cmd) ! { ! case IDM_EXIT: ! main_dlg.OnExitButton(); ! break; ! ! case IDM_WINDOW: ! main_dlg.OpenIcon(); ! main_dlg.SetWindowPos(&CWnd::wndTop, 0, 0, 0, 0, SWP_NOMOVE | SWP_NOSIZE); ! break; ! ! case IDM_SETTINGS: ! main_dlg.m_TabCtrl.SetCurSel(0); ! main_dlg.m_TabCtrl.DisplayTabDialog(); ! main_dlg.OpenIcon(); ! main_dlg.SetWindowPos(&CWnd::wndTop, 0, 0, 0, 0, SWP_NOMOVE | SWP_NOSIZE); ! break; ! ! case IDM_OUTPUT: ! main_dlg.m_TabCtrl.SetCurSel(1); ! main_dlg.m_TabCtrl.DisplayTabDialog(); ! main_dlg.OpenIcon(); ! main_dlg.SetWindowPos(&CWnd::wndTop, 0, 0, 0, 0, SWP_NOMOVE | SWP_NOSIZE); ! break; ! ! case IDM_STOP: ! main_dlg.OnStopButton(); ! break; ! ! case IDM_START: ! main_dlg.OnStartButton(); ! break; ! } ! ! DestroyMenu(hMenu); ! } ! ! void TrayIcon::setStatus( status con_stat, const char* message ) ! { ! switch( con_stat ) ! { ! case CONNECTED: ! setTrayAppearance( false, IDI_ICON2, message ); ! break; ! ! case OFF: ! setTrayAppearance( false, IDI_ICON3, message ); ! break; ! ! case ON: ! setTrayAppearance( false, IDI_ICON1, message ); ! break; ! } ! } ! ! void TrayIcon::setTrayAppearance( bool start, unsigned int res_id, const char* message ) ! { ! NOTIFYICONDATA notifyIconData; ! ! notifyIconData.cbSize = sizeof(notifyIconData); ! notifyIconData.hWnd = s_hWnd; ! ! notifyIconData.uFlags = NIF_ICON | NIF_MESSAGE | NIF_TIP; ! notifyIconData.uCallbackMessage = 123456; ! notifyIconData.uID = TRAYICONID; ! notifyIconData.hIcon = (HICON)LoadIcon( hInst, MAKEINTRESOURCE( res_id ) ); ! strcpy( notifyIconData.szTip, message ); ! ! if( start ) ! Shell_NotifyIcon( NIM_ADD, ¬ifyIconData ); ! else ! Shell_NotifyIcon( NIM_MODIFY, ¬ifyIconData ); ! } ! ! TrayIcon::TrayIcon( CFrontendDlg& dlg, HINSTANCE hInst ) : main_dlg( dlg ), hInst( hInst ) ! { ! instance = this; ! WNDCLASS wndClass; ! ! wndClass.style = 0; ! wndClass.lpfnWndProc = TrayIconProc; ! wndClass.cbClsExtra = 0; ! wndClass.cbWndExtra = 0; ! wndClass.hInstance = hInst; ! wndClass.hIcon = NULL; ! wndClass.hCursor = NULL; ! wndClass.hbrBackground = (HBRUSH)GetStockObject(WHITE_BRUSH); ! wndClass.lpszMenuName = NULL; ! wndClass.lpszClassName = "OLSRdTrayIcon"; ! ! if (0 != RegisterClass(&wndClass)) ! { ! s_hWnd = CreateWindow( ! "OLSRdTrayIcon", ! "Invisible Message Window", ! WS_OVERLAPPEDWINDOW, ! CW_USEDEFAULT, ! CW_USEDEFAULT, ! CW_USEDEFAULT, ! CW_USEDEFAULT, ! NULL, ! NULL, ! hInst, ! NULL); ! ! if (s_hWnd) ! { ! ShowWindow(s_hWnd, SW_HIDE); ! ! UpdateWindow(s_hWnd); ! } ! } ! ! setTrayAppearance( true, IDI_ICON3, "Starting..." ); ! } ! ! TrayIcon::~TrayIcon() ! { ! NOTIFYICONDATA notifyIconData; ! ! notifyIconData.cbSize = sizeof(notifyIconData); ! notifyIconData.hWnd = s_hWnd; ! ! notifyIconData.uFlags = NIF_ICON | NIF_MESSAGE | NIF_TIP; ! notifyIconData.uCallbackMessage = 123456; ! notifyIconData.uID = TRAYICONID; ! notifyIconData.hIcon = NULL; ! ! Shell_NotifyIcon( NIM_DELETE, ¬ifyIconData ); ! } --- 1,185 ---- ! #include "stdafx.h" ! #include "TrayIcon.h" ! ! #include ! #include ! ! #include "Frontend.h" ! #include "FrontendDlg.h" ! #include "Resource.h" ! ! #define TRAYICONID 987435 ! ! HWND s_hWnd; ! TrayIcon* TrayIcon::instance = NULL; ! ! LRESULT CALLBACK TrayIconProc( HWND, UINT, WPARAM, LPARAM lParam ) ! { ! switch (lParam) ! { ! case WM_LBUTTONDOWN: ! case WM_RBUTTONDOWN: ! TrayIcon::instance->displayPopup(); ! break; ! } ! ! return 1; ! } ! ! void TrayIcon::displayPopup() ! { ! HMENU hMenu = LoadMenu(AfxGetInstanceHandle(), MAKEINTRESOURCE(IDR_TRAYMENU)); ! HMENU hSubMenu = GetSubMenu(hMenu, 0); ! ! EnableMenuItem(hSubMenu, IDM_STOP, ! MF_BYCOMMAND | (main_dlg.m_StopButton.IsWindowEnabled() ? MF_ENABLED : MF_GRAYED)); ! ! EnableMenuItem(hSubMenu, IDM_START, ! MF_BYCOMMAND | (main_dlg.m_StartButton.IsWindowEnabled() ? MF_ENABLED : MF_GRAYED)); ! ! POINT pt; ! ! GetCursorPos(&pt); ! ! SetForegroundWindow( s_hWnd ); ! ! int cmd = TrackPopupMenu(hSubMenu, ! TPM_RIGHTBUTTON | TPM_RETURNCMD, ! pt.x, ! pt.y, ! 0, ! s_hWnd, ! NULL); ! ! PostMessage(s_hWnd, WM_NULL, 0, 0); ! ! switch(cmd) ! { ! case IDM_EXIT: ! main_dlg.OnExitButton(); ! break; ! ! case IDM_WINDOW: ! main_dlg.OpenIcon(); ! main_dlg.SetWindowPos(&CWnd::wndTop, 0, 0, 0, 0, SWP_NOMOVE | SWP_NOSIZE); ! break; ! ! case IDM_SETTINGS: ! main_dlg.m_TabCtrl.SetCurSel(0); ! main_dlg.m_TabCtrl.DisplayTabDialog(); ! main_dlg.OpenIcon(); ! main_dlg.SetWindowPos(&CWnd::wndTop, 0, 0, 0, 0, SWP_NOMOVE | SWP_NOSIZE); ! break; ! ! case IDM_OUTPUT: ! main_dlg.m_TabCtrl.SetCurSel(1); ! main_dlg.m_TabCtrl.DisplayTabDialog(); ! main_dlg.OpenIcon(); ! main_dlg.SetWindowPos(&CWnd::wndTop, 0, 0, 0, 0, SWP_NOMOVE | SWP_NOSIZE); ! break; ! ! case IDM_STOP: ! main_dlg.OnStopButton(); ! break; ! ! case IDM_START: ! main_dlg.OnStartButton(); ! break; ! } ! ! DestroyMenu(hMenu); ! } ! ! void TrayIcon::setStatus( status con_stat, const char* message ) ! { ! switch( con_stat ) ! { ! case CONNECTED: ! setTrayAppearance( false, IDI_ICON2, message ); ! break; ! ! case OFF: ! setTrayAppearance( false, IDI_ICON3, message ); ! break; ! ! case ON: ! setTrayAppearance( false, IDI_ICON1, message ); ! break; ! } ! } ! ! void TrayIcon::setTrayAppearance( bool start, unsigned int res_id, const char* message ) ! { ! NOTIFYICONDATA notifyIconData; ! ! notifyIconData.cbSize = sizeof(notifyIconData); ! notifyIconData.hWnd = s_hWnd; ! ! notifyIconData.uFlags = NIF_ICON | NIF_MESSAGE | NIF_TIP; ! notifyIconData.uCallbackMessage = 123456; ! notifyIconData.uID = TRAYICONID; ! notifyIconData.hIcon = (HICON)LoadIcon( hInst, MAKEINTRESOURCE( res_id ) ); ! strcpy_s( notifyIconData.szTip, sizeof (notifyIconData.szTip), message ); ! ! if( start ) ! Shell_NotifyIcon( NIM_ADD, ¬ifyIconData ); ! else ! Shell_NotifyIcon( NIM_MODIFY, ¬ifyIconData ); ! } ! ! TrayIcon::TrayIcon( CFrontendDlg& dlg, HINSTANCE hInst ) : main_dlg( dlg ), hInst( hInst ) ! { ! instance = this; ! WNDCLASS wndClass; ! ! wndClass.style = 0; ! wndClass.lpfnWndProc = TrayIconProc; ! wndClass.cbClsExtra = 0; ! wndClass.cbWndExtra = 0; ! wndClass.hInstance = hInst; ! wndClass.hIcon = NULL; ! wndClass.hCursor = NULL; ! wndClass.hbrBackground = (HBRUSH)GetStockObject(WHITE_BRUSH); ! wndClass.lpszMenuName = NULL; ! wndClass.lpszClassName = "OLSRdTrayIcon"; ! ! if (0 != RegisterClass(&wndClass)) ! { ! s_hWnd = CreateWindow( ! "OLSRdTrayIcon", ! "Invisible Message Window", ! WS_OVERLAPPEDWINDOW, ! CW_USEDEFAULT, ! CW_USEDEFAULT, ! CW_USEDEFAULT, ! CW_USEDEFAULT, ! NULL, ! NULL, ! hInst, ! NULL); ! ! if (s_hWnd) ! { ! ShowWindow(s_hWnd, SW_HIDE); ! ! UpdateWindow(s_hWnd); ! } ! } ! ! setTrayAppearance( true, IDI_ICON3, "Starting..." ); ! } ! ! TrayIcon::~TrayIcon() ! { ! NOTIFYICONDATA notifyIconData; ! ! notifyIconData.cbSize = sizeof(notifyIconData); ! notifyIconData.hWnd = s_hWnd; ! ! notifyIconData.uFlags = NIF_ICON | NIF_MESSAGE | NIF_TIP; ! notifyIconData.uCallbackMessage = 123456; ! notifyIconData.uID = TRAYICONID; ! notifyIconData.hIcon = NULL; ! ! Shell_NotifyIcon( NIM_DELETE, ¬ifyIconData ); ! } Index: FrontendDlg.h =================================================================== RCS file: /cvsroot/olsrd/olsrd-current/gui/win32/Main/FrontendDlg.h,v retrieving revision 1.6 retrieving revision 1.7 diff -C2 -d -r1.6 -r1.7 *** FrontendDlg.h 17 Jan 2005 11:52:36 -0000 1.6 --- FrontendDlg.h 27 Mar 2007 03:01:06 -0000 1.7 *************** *** 1,138 **** ! /* ! * The olsr.org Optimized Link-State Routing daemon (olsrd) ! * Copyright (c) 2004, Thomas Lopatic (thomas at lopatic.de) ! * All rights reserved. ! * ! * Redistribution and use in source and binary forms, with or without ! * modification, are permitted provided that the following conditions ! * are met: ! * ! * * Redistributions of source code must retain the above copyright ! * notice, this list of conditions and the following disclaimer. ! * * Redistributions in binary form must reproduce the above copyright ! * notice, this list of conditions and the following disclaimer in ! * the documentation and/or other materials provided with the ! * distribution. ! * * Neither the name of olsr.org, olsrd nor the names of its ! * contributors may be used to endorse or promote products derived ! * from this software without specific prior written permission. ! * ! * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS ! * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT ! * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS ! * FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE ! * COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, ! * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, ! * BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; ! * LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER ! * CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT ! * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ! * ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE ! * POSSIBILITY OF SUCH DAMAGE. ! * ! * Visit http://www.olsr.org for more information. ! * ! * If you find this software useful feel free to make a donation ! * to the project. For more information see the website or contact ! * the copyright holders. ! * ! * $Id$ ! */ ! ! #if !defined(AFX_FRONTENDDLG_H__7D68FBC0_7448_479B_81F0_3FBBDE291395__INCLUDED_) ! #define AFX_FRONTENDDLG_H__7D68FBC0_7448_479B_81F0_3FBBDE291395__INCLUDED_ ! ! #if _MSC_VER > 1000 ! #pragma once ! #endif ! ! #include "MyTabCtrl.h" ! #include "NodeEntry.h" ! ! #define PIPE_MODE_RUN 0 ! #define PIPE_MODE_INT 1 ! ! class CFrontendDlg : public CDialog ! { ! public: ! CFrontendDlg(CWnd* pParent = NULL); ! ! //{{AFX_DATA(CFrontendDlg) ! enum { IDD = IDD_FRONTEND_DIALOG }; ! CButton m_StopButton; ! CButton m_StartButton; ! MyTabCtrl m_TabCtrl; ! //}}AFX_DATA ! ! unsigned int LogThreadFunc(void); ! unsigned int NetThreadFunc(void); ! ! CString ConfigFile; ! protected: ! ! //{{AFX_VIRTUAL(CFrontendDlg) ! virtual void DoDataExchange(CDataExchange* pDX); ! //}}AFX_VIRTUAL ! ! public: ! //{{AFX_MSG(CFrontendDlg) ! virtual BOOL OnInitDialog(); ! afx_msg void OnOK(); ! afx_msg void OnCancel(); ! afx_msg void OnStartButton(); ! afx_msg void OnStopButton(); ! afx_msg void OnExitButton(); ! //}}AFX_MSG ! ! protected: ! DECLARE_MESSAGE_MAP() ! ! int StartOlsrd(void); ! int StopOlsrd(void); ! ! int GetInterfaces(void); ! ! HANDLE Event; ! ! CString StoredTempFile; ! ! SOCKET SockHand; ! ! int PipeMode; ! int ExecutePipe(const char *, HANDLE *, HANDLE *, HANDLE *); ! ! CWinThread *LogThread; ! CWinThread *NetThread; ! ! CStringArray Interfaces; ! CStringArray Addresses; ! CStringArray IsWlan; ! ! HANDLE OutRead, InWrite; ! HANDLE ShimProc; ! ! void HandleIpcRoute(struct IpcRoute *); ! void HandleIpcConfig(struct IpcConfig *); ! void HandleOlsrHello(struct OlsrHello *, int); ! void HandleOlsrTc(struct OlsrTc *, int); ! void HandleOlsrMid(struct OlsrHeader *); ! void HandleOlsrHna(struct OlsrHeader *); ! ! void AddNode(unsigned int, unsigned int); ! void AddMpr(unsigned int, unsigned int, unsigned int); ! void AddMid(unsigned int, unsigned int, unsigned int); ! void AddHna(unsigned int, unsigned int, unsigned int, unsigned int); ! ! CList NodeList; ! ! void Timeout(void); ! ! unsigned __int64 Now; ! ! unsigned int LocalHost; ! }; ! ! //{{AFX_INSERT_LOCATION}} ! ! #endif ! --- 1,138 ---- ! /* ! * The olsr.org Optimized Link-State Routing daemon (olsrd) ! * Copyright (c) 2004, Thomas Lopatic (thomas at lopatic.de) ! * All rights reserved. ! * ! * Redistribution and use in source and binary forms, with or without ! * modification, are permitted provided that the following conditions ! * are met: ! * ! * * Redistributions of source code must retain the above copyright ! * notice, this list of conditions and the following disclaimer. ! * * Redistributions in binary form must reproduce the above copyright ! * notice, this list of conditions and the following disclaimer in ! * the documentation and/or other materials provided with the ! * distribution. ! * * Neither the name of olsr.org, olsrd nor the names of its ! * contributors may be used to endorse or promote products derived ! * from this software without specific prior written permission. ! * ! * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS ! * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT ! * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS ! * FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE ! * COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, ! * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, ! * BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; ! * LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER ! * CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT ! * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ! * ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE ! * POSSIBILITY OF SUCH DAMAGE. ! * ! * Visit http://www.olsr.org for more information. ! * ! * If you find this software useful feel free to make a donation ! * to the project. For more information see the website or contact ! * the copyright holders. ! * ! * $Id$ ! */ ! ! #if !defined(AFX_FRONTENDDLG_H__7D68FBC0_7448_479B_81F0_3FBBDE291395__INCLUDED_) ! #define AFX_FRONTENDDLG_H__7D68FBC0_7448_479B_81F0_3FBBDE291395__INCLUDED_ ! ! #if _MSC_VER > 1000 ! #pragma once ! #endif ! ! #include "MyTabCtrl.h" ! #include "NodeEntry.h" ! ! #define PIPE_MODE_RUN 0 ! #define PIPE_MODE_INT 1 ! ! class CFrontendDlg : public CDialog ! { ! public: ! CFrontendDlg(CWnd* pParent = NULL); ! ! //{{AFX_DATA(CFrontendDlg) ! enum { IDD = IDD_FRONTEND_DIALOG }; ! CButton m_StopButton; ! CButton m_StartButton; ! MyTabCtrl m_TabCtrl; ! //}}AFX_DATA ! ! unsigned int LogThreadFunc(void); ! unsigned int NetThreadFunc(void); ! ! CString ConfigFile; ! protected: ! ! //{{AFX_VIRTUAL(CFrontendDlg) ! virtual void DoDataExchange(CDataExchange* pDX); ! //}}AFX_VIRTUAL ! ! public: ! //{{AFX_MSG(CFrontendDlg) ! virtual BOOL OnInitDialog(); ! afx_msg void OnOK(); ! afx_msg void OnCancel(); ! afx_msg void OnStartButton(); ! afx_msg void OnStopButton(); ! afx_msg void OnExitButton(); ! //}}AFX_MSG ! ! protected: ! DECLARE_MESSAGE_MAP() ! ! int StartOlsrd(void); ! int StopOlsrd(void); ! ! int GetInterfaces(void); ! ! HANDLE Event; ! ! CString StoredTempFile; ! ! SOCKET SockHand; ! ! int PipeMode; ! int ExecutePipe(const char *, HANDLE *, HANDLE *, HANDLE *); ! ! CWinThread *LogThread; ! CWinThread *NetThread; ! ! CStringArray Interfaces; ! CStringArray Addresses; ! CStringArray IsWlan; ! ! HANDLE OutRead, InWrite; ! HANDLE ShimProc; ! ! void HandleIpcRoute(struct IpcRoute *); ! void HandleIpcConfig(struct IpcConfig *); ! void HandleOlsrHello(struct OlsrHello *, int); ! void HandleOlsrTc(struct OlsrTc *, int); ! void HandleOlsrMid(struct OlsrHeader *); ! void HandleOlsrHna(struct OlsrHeader *); ! ! void AddNode(unsigned int, unsigned int); ! void AddMpr(unsigned int, unsigned int, unsigned int); ! void AddMid(unsigned int, unsigned int, unsigned int); ! void AddHna(unsigned int, unsigned int, unsigned int, unsigned int); ! ! CList NodeList; ! ! void Timeout(void); ! ! unsigned __int64 Now; ! ! unsigned int LocalHost; ! }; ! ! //{{AFX_INSERT_LOCATION}} ! ! #endif ! Index: HnaEntry.h =================================================================== RCS file: /cvsroot/olsrd/olsrd-current/gui/win32/Main/HnaEntry.h,v retrieving revision 1.3 retrieving revision 1.4 diff -C2 -d -r1.3 -r1.4 *** HnaEntry.h 21 Nov 2004 01:21:10 -0000 1.3 --- HnaEntry.h 27 Mar 2007 03:01:06 -0000 1.4 *************** *** 1,56 **** ! /* ! * The olsr.org Optimized Link-State Routing daemon (olsrd) ! * Copyright (c) 2004, Thomas Lopatic (thomas at lopatic.de) ! * All rights reserved. ! * ! * Redistribution and use in source and binary forms, with or without ! * modification, are permitted provided that the following conditions ! * are met: ! * ! * * Redistributions of source code must retain the above copyright ! * notice, this list of conditions and the following disclaimer. ! * * Redistributions in binary form must reproduce the above copyright ! * notice, this list of conditions and the following disclaimer in ! * the documentation and/or other materials provided with the ! * distribution. ! * * Neither the name of olsr.org, olsrd nor the names of its ! * contributors may be used to endorse or promote products derived ! * from this software without specific prior written permission. ! * ! * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS ! * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT ! * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS ! * FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE ! * COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, ! * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, ! * BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; ! * LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER ! * CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT ! * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ! * ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE ! * POSSIBILITY OF SUCH DAMAGE. ! * ! * Visit http://www.olsr.org for more information. ! * ! * If you find this software useful feel free to make a donation ! * to the project. For more information see the website or contact ! * the copyright holders. ! * ! * $Id$ ! */ ! ! #if !defined TL_HNAENTRY_H ! #define TL_HNAENTRY_H ! ! class HnaEntry ! { ! public: ! unsigned int Addr; ! unsigned int Mask; ! unsigned __int64 Timeout; ! ! class HnaEntry &HnaEntry::operator=(class HnaEntry &); ! BOOL HnaEntry::operator==(const class HnaEntry &) const; ! }; ! ! #endif --- 1,56 ---- ! /* ! * The olsr.org Optimized Link-State Routing daemon (olsrd) ! * Copyright (c) 2004, Thomas Lopatic (thomas at lopatic.de) ! * All rights reserved. ! * ! * Redistribution and use in source and binary forms, with or without ! * modification, are permitted provided that the following conditions ! * are met: ! * ! * * Redistributions of source code must retain the above copyright ! * notice, this list of conditions and the following disclaimer. ! * * Redistributions in binary form must reproduce the above copyright ! * notice, this list of conditions and the following disclaimer in ! * the documentation and/or other materials provided with the ! * distribution. ! * * Neither the name of olsr.org, olsrd nor the names of its ! * contributors may be used to endorse or promote products derived ! * from this software without specific prior written permission. ! * ! * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS ! * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT ! * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS ! * FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE ! * COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, ! * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, ! * BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; ! * LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER ! * CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT ! * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ! * ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE ! * POSSIBILITY OF SUCH DAMAGE. ! * ! * Visit http://www.olsr.org for more information. ! * ! * If you find this software useful feel free to make a donation ! * to the project. For more information see the website or contact ! * the copyright holders. ! * ! * $Id$ ! */ ! ! #if !defined TL_HNAENTRY_H ! #define TL_HNAENTRY_H ! ! class HnaEntry ! { ! public: ! unsigned int Addr; ! unsigned int Mask; ! unsigned __int64 Timeout; ! ! class HnaEntry &HnaEntry::operator=(class HnaEntry &); ! BOOL HnaEntry::operator==(const class HnaEntry &) const; ! }; ! ! #endif --- Switch.exe.manifest DELETED --- Index: MyDialog4.h =================================================================== RCS file: /cvsroot/olsrd/olsrd-current/gui/win32/Main/MyDialog4.h,v retrieving revision 1.3 retrieving revision 1.4 diff -C2 -d -r1.3 -r1.4 *** MyDialog4.h 21 Nov 2004 01:21:10 -0000 1.3 --- MyDialog4.h 27 Mar 2007 03:01:06 -0000 1.4 *************** *** 1,83 **** ! /* ! * The olsr.org Optimized Link-State Routing daemon (olsrd) ! * Copyright (c) 2004, Thomas Lopatic (thomas at lopatic.de) ! * All rights reserved. ! * ! * Redistribution and use in source and binary forms, with or without ! * modification, are permitted provided that the following conditions ! * are met: ! * ! * * Redistributions of source code must retain the above copyright ! * notice, this list of conditions and the following disclaimer. ! * * Redistributions in binary form must reproduce the above copyright ! * notice, this list of conditions and the following disclaimer in ! * the documentation and/or other materials provided with the ! * distribution. ! * * Neither the name of olsr.org, olsrd nor the names of its ! * contributors may be used to endorse or promote products derived ! * from this software without specific prior written permission. ! * ! * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS ! * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT ! * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS ! * FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE ! * COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, ! * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, ! * BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; ! * LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER ! * CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT ! * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ! * ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE ! * POSSIBILITY OF SUCH DAMAGE. ! * ! * Visit http://www.olsr.org for more information. ! * ! * If you find this software useful feel free to make a donation ! * to the project. For more information see the website or contact ! * the copyright holders. ! * ! * $Id$ ! */ ! ! #if !defined(AFX_MYDIALOG4_H__1A381668_A36B_4C51_9B79_643BC2A59D88__INCLUDED_) ! #define AFX_MYDIALOG4_H__1A381668_A36B_4C51_9B79_643BC2A59D88__INCLUDED_ ! ! #if _MSC_VER > 1000 ! #pragma once ! #endif ! ! class MyDialog4 : public CDialog ! { ! public: ! MyDialog4(CWnd* pParent = NULL); ! ! BOOL Create(CWnd *Parent); ! ! void AddRoute(unsigned int, unsigned int, int, char *); ! void DeleteRoute(unsigned int); ! void ClearRoutes(void); ! ! //{{AFX_DATA(MyDialog4) ! enum { IDD = IDD_DIALOG4 }; ! CListCtrl m_RoutingTable; ! //}}AFX_DATA ! ! ! //{{AFX_VIRTUAL(MyDialog4) ! protected: ! virtual void DoDataExchange(CDataExchange* pDX); ! //}}AFX_VIRTUAL ! ! protected: ! ! //{{AFX_MSG(MyDialog4) ! afx_msg void OnOK(); ! afx_msg void OnCancel(); ! virtual BOOL OnInitDialog(); ! //}}AFX_MSG ! DECLARE_MESSAGE_MAP() ! }; ! ! //{{AFX_INSERT_LOCATION}} ! ! #endif --- 1,83 ---- ! /* ! * The olsr.org Optimized Link-State Routing daemon (olsrd) ! * Copyright (c) 2004, Thomas Lopatic (thomas at lopatic.de) ! * All rights reserved. ! * ! * Redistribution and use in source and binary forms, with or without ! * modification, are permitted provided that the following conditions ! * are met: ! * ! * * Redistributions of source code must retain the above copyright ! * notice, this list of conditions and the following disclaimer. ! * * Redistributions in binary form must reproduce the above copyright ! * notice, this list of conditions and the following disclaimer in ! * the documentation and/or other materials provided with the ! * distribution. ! * * Neither the name of olsr.org, olsrd nor the names of its ! * contributors may be used to endorse or promote products derived ! * from this software without specific prior written permission. ! * ! * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS ! * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT ! * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS ! * FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE ! * COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, ! * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, ! * BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; ! * LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER ! * CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT ! * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ! * ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE ! * POSSIBILITY OF SUCH DAMAGE. ! * ! * Visit http://www.olsr.org for more information. ! * ! * If you find this software useful feel free to make a donation ! * to the project. For more information see the website or contact ! * the copyright holders. ! * ! * $Id$ ! */ ! ! #if !defined(AFX_MYDIALOG4_H__1A381668_A36B_4C51_9B79_643BC2A59D88__INCLUDED_) ! #define AFX_MYDIALOG4_H__1A381668_A36B_4C51_9B79_643BC2A59D88__INCLUDED_ ! ! #if _MSC_VER > 1000 ! #pragma once ! #endif ! ! class MyDialog4 : public CDialog ! { ! public: ! MyDialog4(CWnd* pParent = NULL); ! ! BOOL Create(CWnd *Parent); ! ! void AddRoute(unsigned int, unsigned int, int, char *); ! void DeleteRoute(unsigned int); ! void ClearRoutes(void); ! ! //{{AFX_DATA(MyDialog4) ! enum { IDD = IDD_DIALOG4 }; ! CListCtrl m_RoutingTable; ! //}}AFX_DATA ! ! ! //{{AFX_VIRTUAL(MyDialog4) ! protected: ! virtual void DoDataExchange(CDataExchange* pDX); ! //}}AFX_VIRTUAL ! ! protected: ! ! //{{AFX_MSG(MyDialog4) ! afx_msg void OnOK(); ! afx_msg void OnCancel(); ! virtual BOOL OnInitDialog(); ! //}}AFX_MSG ! DECLARE_MESSAGE_MAP() ! }; ! ! //{{AFX_INSERT_LOCATION}} ! ! #endif Index: MyTabCtrl.h =================================================================== RCS file: /cvsroot/olsrd/olsrd-current/gui/win32/Main/MyTabCtrl.h,v retrieving revision 1.5 retrieving revision 1.6 diff -C2 -d -r1.5 -r1.6 *** MyTabCtrl.h 14 Feb 2005 20:39:30 -0000 1.5 --- MyTabCtrl.h 27 Mar 2007 03:01:06 -0000 1.6 *************** *** 1,86 **** ! /* ! * The olsr.org Optimized Link-State Routing daemon (olsrd) ! * Copyright (c) 2004, Thomas Lopatic (thomas at lopatic.de) ! * All rights reserved. ! * ! * Redistribution and use in source and binary forms, with or without ! * modification, are permitted provided that the following conditions ! * are met: ! * ! * * Redistributions of source code must retain the above copyright ! * notice, this list of conditions and the following disclaimer. ! * * Redistributions in binary form must reproduce the above copyright ! * notice, this list of conditions and the following disclaimer in ! * the documentation and/or other materials provided with the ! * distribution. ! * * Neither the name of olsr.org, olsrd nor the names of its ! * contributors may be used to endorse or promote products derived ! * from this software without specific prior written permission. ! * ! * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS ! * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT ! * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS ! * FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE ! * COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, ! * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, ! * BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; ! * LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER ! * CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT ! * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ! * ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE ! * POSSIBILITY OF SUCH DAMAGE. ! * ! * Visit http://www.olsr.org for more information. ! * ! * If you find this software useful feel free to make a donation ! * to the project. For more information see the website or contact ! * the copyright holders. ! * ! * $Id$ ! */ ! ! #if !defined(AFX_MYTABCTRL_H__D443FF52_C52D_4C89_AB4B_19B09687EBAE__INCLUDED_) ! #define AFX_MYTABCTRL_H__D443FF52_C52D_4C89_AB4B_19B09687EBAE__INCLUDED_ ! ! #if _MSC_VER > 1000 ! #pragma once ! #endif ! ! #include "MyDialog1.h" ! #include "MyDialog2.h" ! #include "MyDialog3.h" ! #include "MyDialog4.h" ! ! class MyTabCtrl : public CTabCtrl ! { ! public: ! MyTabCtrl(); ! ! class MyDialog1 m_Dialog1; ! class MyDialog2 m_Dialog2; ! class MyDialog3 m_Dialog3; ! class MyDialog4 m_Dialog4; ! ! void InitTabDialogs(CStringArray *, CStringArray *, CStringArray *); ! void DisplayTabDialog(void); ! ! //{{AFX_VIRTUAL(MyTabCtrl) ! //}}AFX_VIRTUAL ! ! virtual ~MyTabCtrl(); ! ! protected: ! CDialog *Dialogs[4]; ! ! int Sel; ! ! //{{AFX_MSG(MyTabCtrl) ! afx_msg void OnSelchange(NMHDR* pNMHDR, LRESULT* pResult); ! //}}AFX_MSG ! ! DECLARE_MESSAGE_MAP() ! }; ! ! //{{AFX_INSERT_LOCATION}} ! ! #endif --- 1,86 ---- ! /* ! * The olsr.org Optimized Link-State Routing daemon (olsrd) ! * Copyright (c) 2004, Thomas Lopatic (thomas at lopatic.de) ! * All rights reserved. ! * ! * Redistribution and use in source and binary forms, with or without ! * modification, are permitted provided that the following conditions ! * are met: ! * ! * * Redistributions of source code must retain the above copyright ! * notice, this list of conditions and the following disclaimer. ! * * Redistributions in binary form must reproduce the above copyright ! * notice, this list of conditions and the following disclaimer in ! * the documentation and/or other materials provided with the ! * distribution. ! * * Neither the name of olsr.org, olsrd nor the names of its ! * contributors may be used to endorse or promote products derived ! * from this software without specific prior written permission. ! * ! * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS ! * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT ! * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS ! * FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE ! * COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, ! * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, ! * BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; ! * LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER ! * CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT ! * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ! * ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE ! * POSSIBILITY OF SUCH DAMAGE. ! * ! * Visit http://www.olsr.org for more information. ! * ! * If you find this software useful feel free to make a donation ! * to the project. For more information see the website or contact ! * the copyright holders. ! * ! * $Id$ ! */ ! ! #if !defined(AFX_MYTABCTRL_H__D443FF52_C52D_4C89_AB4B_19B09687EBAE__INCLUDED_) ! #define AFX_MYTABCTRL_H__D443FF52_C52D_4C89_AB4B_19B09687EBAE__INCLUDED_ ! ! #if _MSC_VER > 1000 ! #pragma once ! #endif ! ! #include "MyDialog1.h" ! #include "MyDialog2.h" ! #include "MyDialog3.h" ! #include "MyDialog4.h" ! ! class MyTabCtrl : public CTabCtrl ! { ! public: ! MyTabCtrl(); ! ! class MyDialog1 m_Dialog1; ! class MyDialog2 m_Dialog2; ! class MyDialog3 m_Dialog3; ! class MyDialog4 m_Dialog4; ! ! void InitTabDialogs(CStringArray *, CStringArray *, CStringArray *); ! void DisplayTabDialog(void); ! ! //{{AFX_VIRTUAL(MyTabCtrl) ! //}}AFX_VIRTUAL ! ! virtual ~MyTabCtrl(); ! ! protected: ! CDialog *Dialogs[4]; ! ! int Sel; ! ! //{{AFX_MSG(MyTabCtrl) ! afx_msg void OnSelchange(NMHDR* pNMHDR, LRESULT* pResult); ! //}}AFX_MSG ! ! DECLARE_MESSAGE_MAP() ! }; ! ! //{{AFX_INSERT_LOCATION}} ! ! #endif Index: HnaEntry.cpp =================================================================== RCS file: /cvsroot/olsrd/olsrd-current/gui/win32/Main/HnaEntry.cpp,v retrieving revision 1.3 retrieving revision 1.4 diff -C2 -d -r1.3 -r1.4 *** HnaEntry.cpp 21 Nov 2004 01:21:10 -0000 1.3 --- HnaEntry.cpp 27 Mar 2007 03:01:06 -0000 1.4 *************** *** 1,57 **** ! /* ! * The olsr.org Optimized Link-State Routing daemon (olsrd) ! * Copyright (c) 2004, Thomas Lopatic (thomas at lopatic.de) ! * All rights reserved. ! * ! * Redistribution and use in source and binary forms, with or without ! * modification, are permitted provided that the following conditions ! * are met: ! * ! * * Redistributions of source code must retain the above copyright ! * notice, this list of conditions and the following disclaimer. ! * * Redistributions in binary form must reproduce the above copyright ! * notice, this list of conditions and the following disclaimer in ! * the documentation and/or other materials provided with the ! * distribution. ! * * Neither the name of olsr.org, olsrd nor the names of its ! * contributors may be used to endorse or promote products derived ! * from this software without specific prior written permission. ! * ! * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS ! * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT ! * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS ! * FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE ! * COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, ! * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, ! * BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; ! * LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER ! * CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT ! * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ! * ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE ! * POSSIBILITY OF SUCH DAMAGE. ! * ! * Visit http://www.olsr.org for more information. ! * ! * If you find this software useful feel free to make a donation ! * to the project. For more information see the website or contact ! * the copyright holders. ! * ! * $Id$ ! */ ! ! #include "stdafx.h" ! #include "HnaEntry.h" ! ! class HnaEntry &HnaEntry::operator=(class HnaEntry &Src) ! { ! Addr = Src.Addr; ! Mask = Src.Mask; ! Timeout = Src.Timeout; ! ! return *this; ! } ! ! BOOL HnaEntry::operator==(const class HnaEntry &Comp) const ! { ! return Addr == Comp.Addr && Mask == Comp.Mask; ! } --- 1,57 ---- ! /* ! * The olsr.org Optimized Link-State Routing daemon (olsrd) ! * Copyright (c) 2004, Thomas Lopatic (thomas at lopatic.de) ! * All rights reserved. ! * ! * Redistribution and use in source and binary forms, with or without ! * modification, are permitted provided that the following conditions ! * are met: ! * ! * * Redistributions of source code must retain the above copyright ! * notice, this list of conditions and the following disclaimer. ! * * Redistributions in binary form must reproduce the above copyright ! * notice, this list of conditions and the following disclaimer in ! * the documentation and/or other materials provided with the ! * distribution. ! * * Neither the name of olsr.org, olsrd nor the names of its ! * contributors may be used to endorse or promote products derived ! * from this software without specific prior written permission. ! * ! * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS ! * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT ! * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS ! * FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE ! * COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, ! * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, ! * BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; ! * LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER ! * CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT ! * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ! * ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE ! * POSSIBILITY OF SUCH DAMAGE. ! * ! * Visit http://www.olsr.org for more information. ! * ! * If you find this software useful feel free to make a donation ! * to the project. For more information see the website or contact ! * the copyright holders. ! * ! * $Id$ ! */ ! ! #include "stdafx.h" ! #include "HnaEntry.h" ! ! class HnaEntry &HnaEntry::operator=(class HnaEntry &Src) ! { ! Addr = Src.Addr; ! Mask = Src.Mask; ! Timeout = Src.Timeout; ! ! return *this; ! } ! ! BOOL HnaEntry::operator==(const class HnaEntry &Comp) const ! { ! return Addr == Comp.Addr && Mask == Comp.Mask; ! } Index: Frontend.rc =================================================================== RCS file: /cvsroot/olsrd/olsrd-current/gui/win32/Main/Frontend.rc,v retrieving revision 1.7 retrieving revision 1.8 diff -C2 -d -r1.7 -r1.8 *** Frontend.rc 2 Mar 2005 00:13:23 -0000 1.7 --- Frontend.rc 27 Mar 2007 03:01:06 -0000 1.8 *************** *** 1,320 **** ! //Microsoft Developer Studio generated resource script. ! // ! #include "resource.h" ! ! #define APSTUDIO_READONLY_SYMBOLS ! ///////////////////////////////////////////////////////////////////////////// ! // ! // Generated from the TEXTINCLUDE 2 resource. ! // ! #include "afxres.h" ! ! ///////////////////////////////////////////////////////////////////////////// ! #undef APSTUDIO_READONLY_SYMBOLS ! ! ///////////////////////////////////////////////////////////////////////////// ! // English (U.S.) resources ! ! #if !defined(AFX_RESOURCE_DLL) || defined(AFX_TARG_ENU) ! #ifdef _WIN32 ! LANGUAGE LANG_ENGLISH, SUBLANG_ENGLISH_US ! #pragma code_page(1252) ! #endif //_WIN32 ! ! #ifdef APSTUDIO_INVOKED ! ///////////////////////////////////////////////////////////////////////////// ! // ! // TEXTINCLUDE ! // ! ! 1 TEXTINCLUDE MOVEABLE PURE ! BEGIN ! "resource.h\0" ! END ! ! 2 TEXTINCLUDE MOVEABLE PURE ! BEGIN ! "#include ""afxres.h""\r\n" ! "\0" ! END ! ! 3 TEXTINCLUDE MOVEABLE PURE ! BEGIN ! "#define _AFX_NO_SPLITTER_RESOURCES\r\n" ! "#define _AFX_NO_OLE_RESOURCES\r\n" ! "#define _AFX_NO_TRACKER_RESOURCES\r\n" ! "#define _AFX_NO_PROPERTY_RESOURCES\r\n" ! "\r\n" ! "#if !defined(AFX_RESOURCE_DLL) || defined(AFX_TARG_ENU)\r\n" ! "#ifdef _WIN32\r\n" ! "LANGUAGE 9, 1\r\n" ! "#pragma code_page(1252)\r\n" ! "#endif //_WIN32\r\n" ! "#include ""res\\Frontend.rc2"" // non-Microsoft Visual C++ edited resources\r\n" ! "#include ""afxres.rc"" // Standard components\r\n" ! "#endif\r\n" ! "\0" ! END ! ! #endif // APSTUDIO_INVOKED ! ! ! ///////////////////////////////////////////////////////////////////////////// ! // ! // Dialog ! // ! ! IDD_FRONTEND_DIALOG DIALOGEX 0, 0, 399, 289 ! STYLE DS_MODALFRAME | WS_MINIMIZEBOX | WS_POPUP | WS_VISIBLE | WS_CAPTION | ! WS_SYSMENU ! EXSTYLE WS_EX_APPWINDOW ! CAPTION "olsr.org Switch 0.4.9" ! FONT 8, "MS Sans Serif", 0, 0, 0x1 ! BEGIN ! CONTROL "Tab1",IDC_TAB1,"SysTabControl32",0x0,7,7,383,256 ! PUSHBUTTON "Start",IDC_BUTTON1,228,268,50,14 ! PUSHBUTTON "Stop",IDC_BUTTON2,284,268,50,14 ! PUSHBUTTON "Exit",IDC_BUTTON3,340,268,50,14 ! END ! ! IDD_DIALOG1 DIALOG DISCARDABLE 0, 0, 377, 240 ! STYLE WS_CHILD | WS_VISIBLE ! FONT 8, "MS Sans Serif" ! BEGIN ! EDITTEXT IDC_EDIT1,7,25,363,208,ES_MULTILINE | ES_READONLY | ! ES_WANTRETURN | WS_VSCROLL | WS_HSCROLL ! PUSHBUTTON "Freeze",IDC_BUTTON3,152,7,50,14 ! PUSHBUTTON "Continue",IDC_BUTTON2,208,7,50,14 ! PUSHBUTTON "Save",IDC_BUTTON4,264,7,50,14 ! PUSHBUTTON "Clear",IDC_BUTTON1,320,7,50,14 ! END ! ! IDD_DIALOG2 DIALOG DISCARDABLE 0, 0, 377, 240 ! STYLE WS_CHILD | WS_VISIBLE ! FONT 8, "MS Sans Serif" ! BEGIN ! CONTROL "List1",IDC_LIST1,"SysListView32",LVS_LIST | WS_BORDER | ! WS_TABSTOP,7,19,103,76 ! CONTROL "Slider2",IDC_SLIDER2,"msctls_trackbar32",TBS_AUTOTICKS | ! TBS_BOTH | WS_TABSTOP,8,116,87,26 ! EDITTEXT IDC_EDIT7,55,153,26,12,ES_RIGHT ! CONTROL "Enable IP version 6",IDC_CHECK3,"Button", ! BS_AUTOCHECKBOX | WS_DISABLED | WS_TABSTOP,7,171,93,10 ! CONTROL "Offer Internet connection",IDC_CHECK2,"Button", ! BS_AUTOCHECKBOX | WS_TABSTOP,7,187,93,10 ! EDITTEXT IDC_EDIT1,189,7,26,12,ES_RIGHT ! EDITTEXT IDC_EDIT2,305,7,26,12,ES_RIGHT ! EDITTEXT IDC_EDIT3,189,23,26,12,ES_RIGHT ! EDITTEXT IDC_EDIT9,305,23,26,12,ES_RIGHT ! EDITTEXT IDC_EDIT4,189,39,26,12,ES_RIGHT ! EDITTEXT IDC_EDIT10,305,39,26,12,ES_RIGHT ! EDITTEXT IDC_EDIT5,189,55,26,12,ES_RIGHT ! EDITTEXT IDC_EDIT6,305,55,26,12,ES_RIGHT ! COMBOBOX IDC_COMBO1,189,76,26,41,CBS_DROPDOWNLIST | CBS_SORT | ! WS_VSCROLL | WS_TABSTOP ! EDITTEXT IDC_EDIT15,305,77,26,12,ES_RIGHT | ES_NUMBER ! CONTROL "Enable hysteresis",IDC_CHECK1,"Button",BS_AUTOCHECKBOX | ! WS_TABSTOP,134,101,74,10 ! EDITTEXT IDC_EDIT12,189,115,26,12,ES_RIGHT ! EDITTEXT IDC_EDIT13,305,115,26,12,ES_RIGHT ! EDITTEXT IDC_EDIT11,189,131,26,12,ES_RIGHT ! CONTROL "Enable ETX link quality",IDC_CHECK4,"Button", ! BS_AUTOCHECKBOX | WS_TABSTOP,132,155,92,10 ! CONTROL "for MPR selection only",IDC_RADIO1,"Button", ! BS_AUTORADIOBUTTON | WS_GROUP | WS_TABSTOP,132,171,87,10 ! CONTROL "for MPR selection and routing",IDC_RADIO2,"Button", ! BS_AUTORADIOBUTTON | WS_GROUP | WS_TABSTOP,132,187,109, ! 10 ! EDITTEXT IDC_EDIT14,305,169,26,12,ES_RIGHT | ES_NUMBER ! PUSHBUTTON "Open",IDC_BUTTON4,210,219,50,14 ! PUSHBUTTON "Save",IDC_BUTTON5,265,219,50,14 ! PUSHBUTTON "Reset",IDC_BUTTON1,320,219,50,14 ! LTEXT "Interface list",IDC_STATIC,7,8,39,8 ! LTEXT "Debug level",IDC_STATIC,7,105,39,8 ! RTEXT "HELLO interval:",IDC_STATIC,132,9,51,8 ! RTEXT "HELLO hold:",IDC_STATIC,247,9,42,8 ! RTEXT "MID interval:",IDC_STATIC,132,25,41,8 ! RTEXT "MID hold:",IDC_STATIC,247,25,32,8 ! RTEXT "HNA interval:",IDC_STATIC,132,41,43,8 ! RTEXT "HNA hold:",IDC_STATIC,247,41,34,8 ! RTEXT "TC interval:",IDC_STATIC,132,57,37,8 ! RTEXT "TC hold:",IDC_STATIC,247,57,28,8 ! RTEXT "TC redundancy:",IDC_STATIC,132,79,52,8 ! RTEXT "MPR coverage:",IDC_STATIC,247,79,51,8 ! LTEXT "sec",IDC_STATIC,219,9,12,8 ! LTEXT "sec",IDC_STATIC,335,9,12,8 ! LTEXT "sec",IDC_STATIC,219,25,12,8 ! LTEXT "sec",IDC_STATIC,335,25,12,8 ! LTEXT "sec",IDC_STATIC,219,41,12,8 ! LTEXT "sec",IDC_STATIC,335,41,12,8 ! LTEXT "sec",IDC_STATIC,219,57,12,8 ! LTEXT "sec",IDC_STATIC,335,57,12,8 ! RTEXT "Poll interval:",IDC_STATIC,7,155,39,8 ! LTEXT "sec",IDC_STATIC,85,155,12,8 ! CTEXT "0",IDC_TEXT1,96,123,11,8 ! RTEXT "Low mark:",IDC_STATIC,132,117,34,8 ! RTEXT "Scaling:",IDC_STATIC,132,133,26,8 ! RTEXT "High mark:",IDC_STATIC,247,117,35,8 ! RTEXT "Window size:",IDC_STATIC,247,171,43,8 ! END ! ! IDD_DIALOG3 DIALOG DISCARDABLE 0, 0, 377, 240 ! STYLE WS_CHILD | WS_VISIBLE ! FONT 8, "MS Sans Serif" ! BEGIN ! CONTROL "List1",IDC_LIST1,"SysListView32",LVS_REPORT | ! LVS_SINGLESEL | WS_BORDER | WS_TABSTOP,7,18,239,215 ! CONTROL "List4",IDC_LIST4,"SysListView32",LVS_REPORT | ! LVS_SINGLESEL | WS_BORDER | WS_TABSTOP,255,18,115,66 ! CONTROL "List4",IDC_LIST5,"SysListView32",LVS_REPORT | ! LVS_SINGLESEL | WS_BORDER | WS_TABSTOP,255,92,115,66 ! CONTROL "List4",IDC_LIST6,"SysListView32",LVS_REPORT | ! LVS_SINGLESEL | WS_BORDER | WS_TABSTOP,255,167,115,66 ! LTEXT "Node list",IDC_STATIC,7,7,32,8 ! LTEXT "Node information",IDC_STATIC,257,7,59,8 ! END ! ! IDD_DIALOG4 DIALOG DISCARDABLE 0, 0, 377, 240 ! STYLE WS_CHILD | WS_VISIBLE ! FONT 8, "MS Sans Serif" ! BEGIN ! CONTROL "List1",IDC_LIST1,"SysListView32",LVS_REPORT | WS_BORDER | ! WS_TABSTOP,7,18,363,215 ! LTEXT "Routing table",IDC_STATIC,7,7,48,8 ! END ! ! ! ///////////////////////////////////////////////////////////////////////////// ! // ! // DESIGNINFO ! // ! ! #ifdef APSTUDIO_INVOKED ! GUIDELINES DESIGNINFO MOVEABLE PURE ! BEGIN ! IDD_FRONTEND_DIALOG, DIALOG ! BEGIN ! LEFTMARGIN, 7 ! RIGHTMARGIN, 390 ! TOPMARGIN, 7 ! BOTTOMMARGIN, 282 ! END ! ! IDD_DIALOG1, DIALOG ! BEGIN ! LEFTMARGIN, 7 ! RIGHTMARGIN, 370 ! TOPMARGIN, 7 ! BOTTOMMARGIN, 233 ! END ! ! IDD_DIALOG2, DIALOG ! BEGIN ! LEFTMARGIN, 7 ! RIGHTMARGIN, 370 ! TOPMARGIN, 6 ! BOTTOMMARGIN, 233 ! END ! ! IDD_DIALOG3, DIALOG ! BEGIN ! LEFTMARGIN, 7 ! RIGHTMARGIN, 370 ! TOPMARGIN, 7 ! BOTTOMMARGIN, 233 ! END ! ! IDD_DIALOG4, DIALOG ! BEGIN ! LEFTMARGIN, 7 ! RIGHTMARGIN, 370 ! TOPMARGIN, 7 ! BOTTOMMARGIN, 233 ! END ! END ! #endif // APSTUDIO_INVOKED ! ! ! ///////////////////////////////////////////////////////////////////////////// ! // ! // Icon ! // ! ! // Icon with lowest ID value placed first to ensure application icon ! // remains consistent on all systems. ! IDI_ICON1 ICON DISCARDABLE "res\\Frontend.ico" ! IDI_ICON3 ICON DISCARDABLE "res\\Tray2.ico" ! IDI_ICON2 ICON DISCARDABLE "res\\Tray1.ico" ! ! ///////////////////////////////////////////////////////////////////////////// ! // ! // RT_MANIFEST ! // ! ! IDR_241 RT_MANIFEST MOVEABLE PURE "Switch.exe.manifest" ! ! ///////////////////////////////////////////////////////////////////////////// ! // ! // Menu ! // ! ! IDR_TRAYMENU MENU DISCARDABLE ! BEGIN ! POPUP "IDR_TRAYMENU" ! BEGIN ! MENUITEM "Start", IDM_START ! MENUITEM "Stop", IDM_STOP ! POPUP "Show" ! BEGIN ! MENUITEM "Window", IDM_WINDOW ! MENUITEM "Settings", IDM_SETTINGS ! MENUITEM "Output", IDM_OUTPUT ! END ! MENUITEM "Exit", IDM_EXIT ! END ! END ! ! ! ///////////////////////////////////////////////////////////////////////////// ! // ! // Dialog Info ! // ! ! IDD_DIALOG2 DLGINIT ! BEGIN ! IDC_COMBO1, 0x403, 2, 0 ! 0x0030, ! IDC_COMBO1, 0x403, 2, 0 ! 0x0031, ! IDC_COMBO1, 0x403, 2, 0 ! 0x0032, ! 0 ! END ! ! #endif // English (U.S.) resources ! ///////////////////////////////////////////////////////////////////////////// ! ! ! ! #ifndef APSTUDIO_INVOKED ! ///////////////////////////////////////////////////////////////////////////// ! // ! // Generated from the TEXTINCLUDE 3 resource. ! // ! #define _AFX_NO_SPLITTER_RESOURCES ! #define _AFX_NO_OLE_RESOURCES ! #define _AFX_NO_TRACKER_RESOURCES ! #define _AFX_NO_PROPERTY_RESOURCES ! ! #if !defined(AFX_RESOURCE_DLL) || defined(AFX_TARG_ENU) ! #ifdef _WIN32 ! LANGUAGE 9, 1 ! #pragma code_page(1252) ! #endif //_WIN32 ! #include "res\Frontend.rc2" // non-Microsoft Visual C++ edited resources ! #include "afxres.rc" // Standard components ! #endif ! ! ///////////////////////////////////////////////////////////////////////////// ! #endif // not APSTUDIO_INVOKED ! --- 1,297 ---- ! // Microsoft Visual C++ generated resource script. ! // ! #include "resource.h" ! ! #define APSTUDIO_READONLY_SYMBOLS ! ///////////////////////////////////////////////////////////////////////////// ! // ! // Generated from the TEXTINCLUDE 2 resource. ! // ! #include "afxres.h" ! ! ///////////////////////////////////////////////////////////////////////////// ! #undef APSTUDIO_READONLY_SYMBOLS ! ! ///////////////////////////////////////////////////////////////////////////// ! // English (U.S.) resources ! ! #if !defined(AFX_RESOURCE_DLL) || defined(AFX_TARG_ENU) ! #ifdef _WIN32 ! LANGUAGE LANG_ENGLISH, SUBLANG_ENGLISH_US ! #pragma code_page(1252) ! #endif //_WIN32 ! ! #ifdef APSTUDIO_INVOKED ! ///////////////////////////////////////////////////////////////////////////// ! // ! // TEXTINCLUDE ! // ! ! 1 TEXTINCLUDE ! BEGIN ! "resource.h\0" ! END ! ! 2 TEXTINCLUDE ! BEGIN ! "#include ""afxres.h""\r\n" ! "\0" ! END ! ! 3 TEXTINCLUDE ! BEGIN ! "#define _AFX_NO_SPLITTER_RESOURCES\r\n" ! "#define _AFX_NO_OLE_RESOURCES\r\n" ! "#define _AFX_NO_TRACKER_RESOURCES\r\n" ! "#define _AFX_NO_PROPERTY_RESOURCES\r\n" ! "\r\n" ! "#if !defined(AFX_RESOURCE_DLL) || defined(AFX_TARG_ENU)\r\n" ! "#ifdef _WIN32\r\n" ! "LANGUAGE 9, 1\r\n" ! "#pragma code_page(1252)\r\n" ! "#endif //_WIN32\r\n" ! "#include ""res\\Frontend.rc2"" // non-Microsoft Visual C++ edited resources\r\n" ! "#include ""afxres.rc"" // Standard components\r\n" ! "#endif\r\n" ! "\0" ! END ! ! #endif // APSTUDIO_INVOKED ! ! ! ///////////////////////////////////////////////////////////////////////////// ! // ! // Dialog ! // ! ! IDD_FRONTEND_DIALOG DIALOGEX 0, 0, 399, 289 ! STYLE DS_SETFONT | DS_MODALFRAME | WS_MINIMIZEBOX | WS_POPUP | WS_VISIBLE | WS_CAPTION | WS_SYSMENU ! EXSTYLE WS_EX_APPWINDOW ! CAPTION "olsr.org Switch 0.5.0" ! FONT 8, "MS Sans Serif", 0, 0, 0x1 ! BEGIN ! CONTROL "Tab1",IDC_TAB1,"SysTabControl32",0x0,7,7,383,256 ! PUSHBUTTON "Start",IDC_BUTTON1,228,268,50,14 ! PUSHBUTTON "Stop",IDC_BUTTON2,284,268,50,14 ! PUSHBUTTON "Exit",IDC_BUTTON3,340,268,50,14 ! END ! ! IDD_DIALOG1 DIALOG 0, 0, 377, 240 ! STYLE DS_SETFONT | WS_CHILD | WS_VISIBLE ! FONT 8, "MS Sans Serif" ! BEGIN ! EDITTEXT IDC_EDIT1,7,25,363,208,ES_MULTILINE | ES_READONLY | ES_WANTRETURN | WS_VSCROLL | WS_HSCROLL ! PUSHBUTTON "Freeze",IDC_BUTTON3,152,7,50,14 ! PUSHBUTTON "Continue",IDC_BUTTON2,208,7,50,14 ! PUSHBUTTON "Save",IDC_BUTTON4,264,7,50,14 ! PUSHBUTTON "Clear",IDC_BUTTON1,320,7,50,14 ! END ! ! IDD_DIALOG2 DIALOGEX 0, 0, 377, 240 ! STYLE DS_SETFONT | WS_CHILD | WS_VISIBLE ! FONT 8, "MS Sans Serif", 0, 0, 0x0 ! BEGIN ! CONTROL "List1",IDC_LIST1,"SysListView32",LVS_LIST | WS_BORDER | WS_TABSTOP,7,19,103,76 ! CONTROL "Slider2",IDC_SLIDER2,"msctls_trackbar32",TBS_AUTOTICKS | TBS_BOTH | WS_TABSTOP,8,116,87,26 ! EDITTEXT IDC_EDIT7,55,153,26,12,ES_RIGHT ! CONTROL "Enable IP version 6",IDC_CHECK3,"Button",BS_AUTOCHECKBOX | WS_DISABLED | WS_TABSTOP,7,171,93,10 ! CONTROL "Offer Internet connection",IDC_CHECK2,"Button",BS_AUTOCHECKBOX | WS_TABSTOP,7,187,93,10 ! EDITTEXT IDC_EDIT1,189,7,26,12,ES_RIGHT ! EDITTEXT IDC_EDIT2,305,7,26,12,ES_RIGHT ! EDITTEXT IDC_EDIT3,189,23,26,12,ES_RIGHT ! EDITTEXT IDC_EDIT9,305,23,26,12,ES_RIGHT ! EDITTEXT IDC_EDIT4,189,39,26,12,ES_RIGHT ! EDITTEXT IDC_EDIT10,305,39,26,12,ES_RIGHT ! EDITTEXT IDC_EDIT5,189,55,26,12,ES_RIGHT ! EDITTEXT IDC_EDIT6,305,55,26,12,ES_RIGHT ! COMBOBOX IDC_COMBO1,189,76,26,41,CBS_DROPDOWNLIST | CBS_SORT | WS_VSCROLL | WS_TABSTOP ! EDITTEXT IDC_EDIT15,305,77,26,12,ES_RIGHT | ES_NUMBER ! CONTROL "Enable hysteresis",IDC_CHECK1,"Button",BS_AUTOCHECKBOX | WS_TABSTOP,134,101,74,10 ! EDITTEXT IDC_EDIT12,189,115,26,12,ES_RIGHT ! EDITTEXT IDC_EDIT13,305,115,26,12,ES_RIGHT ! EDITTEXT IDC_EDIT11,189,131,26,12,ES_RIGHT ! CONTROL "Enable ETX link quality",IDC_CHECK4,"Button",BS_AUTOCHECKBOX | WS_TABSTOP,132,155,92,10 ! CONTROL "for MPR selection only",IDC_RADIO1,"Button",BS_AUTORADIOBUTTON | WS_GROUP | WS_TABSTOP,132,171,87,10 ! CONTROL "for MPR selection and routing",IDC_RADIO2,"Button",BS_AUTORADIOBUTTON | WS_GROUP | WS_TABSTOP,132,187,109,10 ! EDITTEXT IDC_EDIT14,305,169,26,12,ES_RIGHT | ES_NUMBER ! PUSHBUTTON "Open",IDC_BUTTON4,210,219,50,14 ! PUSHBUTTON "Save",IDC_BUTTON5,265,219,50,14 ! PUSHBUTTON "Reset",IDC_BUTTON1,320,219,50,14 ! LTEXT "Interface list",IDC_STATIC,7,8,39,8 ! LTEXT "Debug level",IDC_STATIC,7,105,39,8 ! RTEXT "HELLO interval:",IDC_STATIC,132,9,51,8 ! RTEXT "HELLO hold:",IDC_STATIC,247,9,42,8 ! RTEXT "MID interval:",IDC_STATIC,132,25,41,8 ! RTEXT "MID hold:",IDC_STATIC,247,25,32,8 ! RTEXT "HNA interval:",IDC_STATIC,132,41,43,8 ! RTEXT "HNA hold:",IDC_STATIC,247,41,34,8 ! RTEXT "TC interval:",IDC_STATIC,132,57,37,8 ! RTEXT "TC hold:",IDC_STATIC,247,57,28,8 ! RTEXT "TC redundancy:",IDC_STATIC,132,79,52,8 ! RTEXT "MPR coverage:",IDC_STATIC,247,79,51,8 ! LTEXT "sec",IDC_STATIC,219,9,12,8 ! LTEXT "sec",IDC_STATIC,335,9,12,8 ! LTEXT "sec",IDC_STATIC,219,25,12,8 ! LTEXT "sec",IDC_STATIC,335,25,12,8 ! LTEXT "sec",IDC_STATIC,219,41,12,8 ! LTEXT "sec",IDC_STATIC,335,41,12,8 ! LTEXT "sec",IDC_STATIC,219,57,12,8 ! LTEXT "sec",IDC_STATIC,335,57,12,8 ! RTEXT "Poll interval:",IDC_STATIC,7,155,39,8 ! LTEXT "sec",IDC_STATIC,85,155,12,8 ! CTEXT "0",IDC_TEXT1,96,123,11,8 ! RTEXT "Low mark:",IDC_STATIC,132,117,34,8 ! RTEXT "Scaling:",IDC_STATIC,132,133,26,8 ! RTEXT "High mark:",IDC_STATIC,247,117,35,8 ! RTEXT "Window size:",IDC_STATIC,247,171,43,8 ! CONTROL "Enable Fish Eye",IDC_CHECK5,"Button",BS_AUTOCHECKBOX | WS_TABSTOP,249,187,92,10 ! END ! ! IDD_DIALOG3 DIALOG 0, 0, 377, 240 ! STYLE DS_SETFONT | WS_CHILD | WS_VISIBLE ! FONT 8, "MS Sans Serif" ! BEGIN ! CONTROL "List1",IDC_LIST1,"SysListView32",LVS_REPORT | LVS_SINGLESEL | WS_BORDER | WS_TABSTOP,7,18,239,215 ! CONTROL "List4",IDC_LIST4,"SysListView32",LVS_REPORT | LVS_SINGLESEL | WS_BORDER | WS_TABSTOP,255,18,115,66 ! CONTROL "List4",IDC_LIST5,"SysListView32",LVS_REPORT | LVS_SINGLESEL | WS_BORDER | WS_TABSTOP,255,92,115,66 ! CONTROL "List4",IDC_LIST6,"SysListView32",LVS_REPORT | LVS_SINGLESEL | WS_BORDER | WS_TABSTOP,255,167,115,66 ! LTEXT "Node list",IDC_STATIC,7,7,32,8 ! LTEXT "Node information",IDC_STATIC,257,7,59,8 ! END ! ! IDD_DIALOG4 DIALOG 0, 0, 377, 240 ! STYLE DS_SETFONT | WS_CHILD | WS_VISIBLE ! FONT 8, "MS Sans Serif" ! BEGIN ! CONTROL "List1",IDC_LIST1,"SysListView32",LVS_REPORT | WS_BORDER | WS_TABSTOP,7,18,363,215 ! LTEXT "Routing table",IDC_STATIC,7,7,48,8 ! END ! ! ! ///////////////////////////////////////////////////////////////////////////// ! // ! // DESIGNINFO ! // ! ! #ifdef APSTUDIO_INVOKED ! GUIDELINES DESIGNINFO ! BEGIN ! IDD_FRONTEND_DIALOG, DIALOG ! BEGIN ! LEFTMARGIN, 7 ! RIGHTMARGIN, 390 ! TOPMARGIN, 7 ! BOTTOMMARGIN, 282 ! END ! ! IDD_DIALOG1, DIALOG ! BEGIN ! LEFTMARGIN, 7 ! RIGHTMARGIN, 370 ! TOPMARGIN, 7 ! BOTTOMMARGIN, 233 ! END ! ! IDD_DIALOG2, DIALOG ! BEGIN ! LEFTMARGIN, 7 ! RIGHTMARGIN, 370 ! TOPMARGIN, 6 ! BOTTOMMARGIN, 233 ! END ! ! IDD_DIALOG3, DIALOG ! BEGIN ! LEFTMARGIN, 7 ! RIGHTMARGIN, 370 ! TOPMARGIN, 7 ! BOTTOMMARGIN, 233 ! END ! ! IDD_DIALOG4, DIALOG ! BEGIN ! LEFTMARGIN, 7 ! RIGHTMARGIN, 370 ! TOPMARGIN, 7 ! BOTTOMMARGIN, 233 ! END ! END ! #endif // APSTUDIO_INVOKED ! ! ! ///////////////////////////////////////////////////////////////////////////// ! // ! // Icon ! // ! ! // Icon with lowest ID value placed first to ensure application icon ! // remains consistent on all systems. ! IDI_ICON1 ICON "res\\Frontend.ico" ! IDI_ICON3 ICON "res\\Tray2.ico" ! IDI_ICON2 ICON "res\\Tray1.ico" ! ! ///////////////////////////////////////////////////////////////////////////// ! // ! // Menu ! // ! ! IDR_TRAYMENU MENU ! BEGIN ! POPUP "IDR_TRAYMENU" ! BEGIN ! MENUITEM "Start", IDM_START ! MENUITEM "Stop", IDM_STOP ! POPUP "Show" ! BEGIN ! MENUITEM "Window", IDM_WINDOW ! MENUITEM "Settings", IDM_SETTINGS ! MENUITEM "Output", IDM_OUTPUT ! END ! MENUITEM "Exit", IDM_EXIT ! END ! END ! ! ! ///////////////////////////////////////////////////////////////////////////// ! // ! // Dialog Info ! // ! ! IDD_DIALOG2 DLGINIT ! BEGIN ! IDC_COMBO1, 0x403, 2, 0 ! 0x0030, ! IDC_COMBO1, 0x403, 2, 0 ! 0x0031, ! IDC_COMBO1, 0x403, 2, 0 ! 0x0032, ! 0 ! END ! ! #endif // English (U.S.) resources ! ///////////////////////////////////////////////////////////////////////////// ! ! ! ! #ifndef APSTUDIO_INVOKED ! ///////////////////////////////////////////////////////////////////////////// ! // ! // Generated from the TEXTINCLUDE 3 resource. ! // ! #define _AFX_NO_SPLITTER_RESOURCES ! #define _AFX_NO_OLE_RESOURCES ! #define _AFX_NO_TRACKER_RESOURCES ! #define _AFX_NO_PROPERTY_RESOURCES ! ! #if !defined(AFX_RESOURCE_DLL) || defined(AFX_TARG_ENU) ! #ifdef _WIN32 ! LANGUAGE 9, 1 ! #pragma code_page(1252) ! #endif //_WIN32 ! #include "res\Frontend.rc2" // non-Microsoft Visual C++ edited resources ! #include "afxres.rc" // Standard components ! #endif ! ! ///////////////////////////////////////////////////////////////////////////// ! #endif // not APSTUDIO_INVOKED ! --- Frontend.dsp DELETED --- Index: MyDialog3.h =================================================================== RCS file: /cvsroot/olsrd/olsrd-current/gui/win32/Main/MyDialog3.h,v retrieving revision 1.3 retrieving revision 1.4 diff -C2 -d -r1.3 -r1.4 *** MyDialog3.h 21 Nov 2004 01:21:10 -0000 1.3 --- MyDialog3.h 27 Mar 2007 03:01:06 -0000 1.4 *************** *** 1,98 **** ! /* ! * The olsr.org Optimized Link-State Routing daemon (olsrd) ! * Copyright (c) 2004, Thomas Lopatic (thomas at lopatic.de) ! * All rights reserved. ! * ! * Redistribution and use in source and binary forms, with or without ! * modification, are permitted provided that the following conditions ! * are met: ! * ! * * Redistributions of source code must retain the above copyright ! * notice, this list of conditions and the following disclaimer. ! * * Redistributions in binary form must reproduce the above copyright ! * notice, this list of conditions and the following disclaimer in ! * the documentation and/or other materials provided with the ! * distribution. ! * * Neither the name of olsr.org, olsrd nor the names of its ! * contributors may be used to endorse or promote products derived ! * from this software without specific prior written permission. ! * ! * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS ! * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT ! * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS ! * FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE ! * COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, ! * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, ! * BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; ! * LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER ! * CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT ! * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ! * ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE ! * POSSIBILITY OF SUCH DAMAGE. ! * ! * Visit http://www.olsr.org for more information. ! * ! * If you find this software useful feel free to make a donation ! * to the project. For more information see the website or contact ! * the copyright holders. ! * ! * $Id$ ! */ ! ! #if !defined(AFX_MYDIALOG3_H__1A381668_A36B_4C51_9B79_643BC2A59D88__INCLUDED_) ! #define AFX_MYDIALOG3_H__1A381668_A36B_4C51_9B79_643BC2A59D88__INCLUDED_ ! ! #if _MSC_VER > 1000 ! #pragma once ! #endif ! ! #include "NodeEntry.h" ! ! class NodeInfo ! { ! public: ! CStringArray MprList; ! CStringArray MidList; ! CStringArray HnaList; ! }; ! ! class MyDialog3 : public CDialog ! { ! public: ! MyDialog3(CWnd* pParent = NULL); ! ! BOOL Create(CWnd *Parent); ! ! void UpdateNodeInfo(CList &); ! void ClearNodeInfo(void); ! ! //{{AFX_DATA(MyDialog3) ! enum { IDD = IDD_DIALOG3 }; ! CListCtrl m_HnaList; ! CListCtrl m_MidList; ! CListCtrl m_MprList; ! CListCtrl m_NodeList; ! //}}AFX_DATA ! ! ! //{{AFX_VIRTUAL(MyDialog3) ! protected: ! virtual void DoDataExchange(CDataExchange* pDX); ! //}}AFX_VIRTUAL ! ! protected: ! unsigned __int64 LastUpdate; ! class NodeInfo *Info; ! ! //{{AFX_MSG(MyDialog3) ! afx_msg void OnOK(); ! afx_msg void OnCancel(); ! virtual BOOL OnInitDialog(); ! afx_msg void OnItemchangedNodeList(NMHDR* pNMHDR, LRESULT* pResult); ! //}}AFX_MSG ! DECLARE_MESSAGE_MAP() ! }; ! ! //{{AFX_INSERT_LOCATION}} ! ! #endif --- 1,98 ---- ! /* ! * The olsr.org Optimized Link-State Routing daemon (olsrd) ! * Copyright (c) 2004, Thomas Lopatic (thomas at lopatic.de) ! * All rights reserved. ! * ! * Redistribution and use in source and binary forms, with or without ! * modification, are permitted provided that the following conditions ! * are met: ! * ! * * Redistributions of source code must retain the above copyright ! * notice, this list of conditions and the following disclaimer. ! * * Redistributions in binary form must reproduce the above copyright ! * notice, this list of conditions and the following disclaimer in ! * the documentation and/or other materials provided with the ! * distribution. ! * * Neither the name of olsr.org, olsrd nor the names of its ! * contributors may be used to endorse or promote products derived ! * from this software without specific prior written permission. ! * ! * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS ! * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT ! * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS ! * FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE ! * COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, ! * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, ! * BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; ! * LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER ! * CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT ! * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ! * ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE ! * POSSIBILITY OF SUCH DAMAGE. ! * ! * Visit http://www.olsr.org for more information. ! * ! * If you find this software useful feel free to make a donation ! * to the project. For more information see the website or contact ! * the copyright holders. ! * ! * $Id$ ! */ ! ! #if !defined(AFX_MYDIALOG3_H__1A381668_A36B_4C51_9B79_643BC2A59D88__INCLUDED_) ! #define AFX_MYDIALOG3_H__1A381668_A36B_4C51_9B79_643BC2A59D88__INCLUDED_ ! ! #if _MSC_VER > 1000 ! #pragma once ! #endif ! ! #include "NodeEntry.h" ! ! class NodeInfo ! { ! public: ! CStringArray MprList; ! CStringArray MidList; ! CStringArray HnaList; ! }; ! ! class MyDialog3 : public CDialog ! { ! public: ! MyDialog3(CWnd* pParent = NULL); ! ! BOOL Create(CWnd *Parent); ! ! void UpdateNodeInfo(CList &); ! void ClearNodeInfo(void); ! ! //{{AFX_DATA(MyDialog3) ! enum { IDD = IDD_DIALOG3 }; ! CListCtrl m_HnaList; ! CListCtrl m_MidList; ! CListCtrl m_MprList; ! CListCtrl m_NodeList; ! //}}AFX_DATA ! ! ! //{{AFX_VIRTUAL(MyDialog3) ! protected: ! virtual void DoDataExchange(CDataExchange* pDX); ! //}}AFX_VIRTUAL ! ! protected: ! unsigned __int64 LastUpdate; ! class NodeInfo *Info; ! ! //{{AFX_MSG(MyDialog3) ! afx_msg void OnOK(); ! afx_msg void OnCancel(); ! virtual BOOL OnInitDialog(); ! afx_msg void OnItemchangedNodeList(NMHDR* pNMHDR, LRESULT* pResult); ! //}}AFX_MSG ! DECLARE_MESSAGE_MAP() ! }; ! ! //{{AFX_INSERT_LOCATION}} ! ! #endif Index: FrontendDlg.cpp =================================================================== RCS file: /cvsroot/olsrd/olsrd-current/gui/win32/Main/FrontendDlg.cpp,v retrieving revision 1.10 retrieving revision 1.11 diff -C2 -d -r1.10 -r1.11 *** FrontendDlg.cpp 30 Mar 2005 21:29:05 -0000 1.10 --- FrontendDlg.cpp 27 Mar 2007 03:01:06 -0000 1.11 *************** *** 1,1009 **** ! /* ! * The olsr.org Optimized Link-State Routing daemon (olsrd) ! * Copyright (c) 2004, Thomas Lopatic (thomas at lopatic.de) ! * All rights reserved. ! * ! * Redistribution and use in source and binary forms, with or without ! * modification, are permitted provided that the following conditions ! * are met: ! * ! * * Redistributions of source code must retain the above copyright [...1989 lines suppressed...] ! return; ! ! m_TabCtrl.m_Dialog1.HandleStop(); ! ! m_StopButton.EnableWindow(FALSE); ! m_StartButton.EnableWindow(TRUE); ! } ! ! void CFrontendDlg::OnExitButton() ! { ! delete TrayIcon::getInstance(); ! ! if (StopOlsrd() < 0) ! return; ! ! m_TabCtrl.m_Dialog3.ClearNodeInfo(); ! m_TabCtrl.m_Dialog4.ClearRoutes(); ! ! DestroyWindow(); ! } Index: MyDialog2.h =================================================================== RCS file: /cvsroot/olsrd/olsrd-current/gui/win32/Main/MyDialog2.h,v retrieving revision 1.8 retrieving revision 1.9 diff -C2 -d -r1.8 -r1.9 *** MyDialog2.h 2 Mar 2005 00:13:23 -0000 1.8 --- MyDialog2.h 27 Mar 2007 03:01:06 -0000 1.9 *************** *** 1,134 **** ! /* ! * The olsr.org Optimized Link-State Routing daemon (olsrd) ! * Copyright (c) 2004, Thomas Lopatic (thomas at lopatic.de) ! * All rights reserved. ! * ! * Redistribution and use in source and binary forms, with or without ! * modification, are permitted provided that the following conditions ! * are met: ! * ! * * Redistributions of source code must retain the above copyright ! * notice, this list of conditions and the following disclaimer. ! * * Redistributions in binary form must reproduce the above copyright ! * notice, this list of conditions and the following disclaimer in ! * the documentation and/or other materials provided with the ! * distribution. ! * * Neither the name of olsr.org, olsrd nor the names of its ! * contributors may be used to endorse or promote products derived ! * from this software without specific prior written permission. ! * ! * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS ! * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT ! * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS ! * FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE ! * COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, ! * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, ! * BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; ! * LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER ! * CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT ! * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ! * ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE ! * POSSIBILITY OF SUCH DAMAGE. ! * ! * Visit http://www.olsr.org for more information. ! * ! * If you find this software useful feel free to make a donation ! * to the project. For more information see the website or contact ! * the copyright holders. ! * ! * $Id$ ! */ ! ! #if !defined(AFX_MYDIALOG2_H__1A381668_A36B_4C51_9B79_643BC2A59D88__INCLUDED_) ! #define AFX_MYDIALOG2_H__1A381668_A36B_4C51_9B79_643BC2A59D88__INCLUDED_ ! ! #if _MSC_VER > 1000 ! #pragma once ! #endif ! ! #include "MyEdit.h" ! ! #define MAKELIB ! #define OLSR_PLUGIN ! #include ! ! class MyDialog2 : public CDialog ! { ! public: ! MyDialog2(CWnd* pParent = NULL); ! ! BOOL Create(CWnd *Parent); ! ! int OpenConfigFile(CString); ! int SaveConfigFile(CString, int); ! ! CStringArray *Interfaces; ! CStringArray *Addresses; ! CStringArray *IsWlan; ! ! struct olsrd_config *Conf; ! ! //{{AFX_DATA(MyDialog2) ! enum { IDD = IDD_DIALOG2 }; ! CComboBox m_TcRed; ! CEdit m_MprCov; ! CButton m_EtxRadio2; ! CButton m_EtxRadio1; ! CEdit m_EtxWindowSize; ! CButton m_EtxCheck; ! CButton m_Ipv6Check; ! CButton m_InternetCheck; ! CButton m_HystCheck; ! MyEdit m_HystThresholdHigh; ! MyEdit m_HystThresholdLow; ! MyEdit m_HystScaling; ! MyEdit m_HnaHold; ! MyEdit m_MidHold; ! MyEdit m_PollInt; ! MyEdit m_TcHold; ! MyEdit m_TcInt; ! MyEdit m_HnaInt; ! MyEdit m_MidInt; ! MyEdit m_HelloHold; ! MyEdit m_HelloInt; ! CListCtrl m_InterfaceList; ! CStatic m_DebugLevelText; ! CSliderCtrl m_DebugLevel; ! //}}AFX_DATA ! ! //{{AFX_VIRTUAL(MyDialog2) ! protected: ! virtual void DoDataExchange(CDataExchange* pDX); ! //}}AFX_VIRTUAL ! ! protected: ! ! //{{AFX_MSG(MyDialog2) ! afx_msg void OnOK(); ! afx_msg void OnCancel(); ! afx_msg void OnHScroll(UINT nSBCode, UINT nPos, CScrollBar* pScrollBar); ! virtual BOOL OnInitDialog(); ! afx_msg void OnHystCheck(); ! afx_msg void OnOpenButton(); ! afx_msg void OnSaveButton(); ! afx_msg void OnResetButton(); ! afx_msg void OnEtxCheck(); ! afx_msg void OnEtxRadio1(); ! afx_msg void OnEtxRadio2(); ! afx_msg void OnKillfocusEtxWinSize(); ! //}}AFX_MSG ! DECLARE_MESSAGE_MAP() ! ! CFont EditFont; ! ! int DebugLevel; ! void SetDebugLevel(int); ! ! void Reset(void); ! ! void OnEtxCheckWorker(void); ! }; ! ! //{{AFX_INSERT_LOCATION}} ! ! #endif --- 1,136 ---- ! /* ! * The olsr.org Optimized Link-State Routing daemon (olsrd) ! * Copyright (c) 2004, Thomas Lopatic (thomas at lopatic.de) ! * All rights reserved. ! * ! * Redistribution and use in source and binary forms, with or without ! * modification, are permitted provided that the following conditions ! * are met: ! * ! * * Redistributions of source code must retain the above copyright ! * notice, this list of conditions and the following disclaimer. ! * * Redistributions in binary form must reproduce the above copyright ! * notice, this list of conditions and the following disclaimer in ! * the documentation and/or other materials provided with the ! * distribution. ! * * Neither the name of olsr.org, olsrd nor the names of its ! * contributors may be used to endorse or promote products derived ! * from this software without specific prior written permission. ! * ! * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS ! * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT ! * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS ! * FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE ! * COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, ! * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, ! * BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; ! * LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER ! * CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT ! * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ! * ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE ! * POSSIBILITY OF SUCH DAMAGE. ! * ! * Visit http://www.olsr.org for more information. ! * ! * If you find this software useful feel free to make a donation ! * to the project. For more information see the website or contact ! * the copyright holders. ! * ! * $Id$ ! */ ! ! #if !defined(AFX_MYDIALOG2_H__1A381668_A36B_4C51_9B79_643BC2A59D88__INCLUDED_) ! #define AFX_MYDIALOG2_H__1A381668_A36B_4C51_9B79_643BC2A59D88__INCLUDED_ ! ! #if _MSC_VER > 1000 ! #pragma once ! #endif ! ! #include "MyEdit.h" ! ! #define MAKELIB ! #define OLSR_PLUGIN ! #include ! #include "afxwin.h" ! ! class MyDialog2 : public CDialog ! { ! public: ! MyDialog2(CWnd* pParent = NULL); ! ! BOOL Create(CWnd *Parent); ! ! int OpenConfigFile(CString); ! int SaveConfigFile(CString, int); ! ! CStringArray *Interfaces; ! CStringArray *Addresses; ! CStringArray *IsWlan; ! ! struct olsrd_config *Conf; ! ! //{{AFX_DATA(MyDialog2) ! enum { IDD = IDD_DIALOG2 }; ! CComboBox m_TcRed; ! CEdit m_MprCov; ! CButton m_EtxRadio2; ! CButton m_EtxRadio1; ! CEdit m_EtxWindowSize; ! CButton m_EtxCheck; ! CButton m_Ipv6Check; ! CButton m_InternetCheck; ! CButton m_HystCheck; ! CButton m_FishEyeCheck; ! MyEdit m_HystThresholdHigh; ! MyEdit m_HystThresholdLow; ! MyEdit m_HystScaling; ! MyEdit m_HnaHold; ! MyEdit m_MidHold; ! MyEdit m_PollInt; ! MyEdit m_TcHold; ! MyEdit m_TcInt; ! MyEdit m_HnaInt; ! MyEdit m_MidInt; ! MyEdit m_HelloHold; ! MyEdit m_HelloInt; ! CListCtrl m_InterfaceList; ! CStatic m_DebugLevelText; ! CSliderCtrl m_DebugLevel; ! //}}AFX_DATA ! ! //{{AFX_VIRTUAL(MyDialog2) ! protected: ! virtual void DoDataExchange(CDataExchange* pDX); ! //}}AFX_VIRTUAL ! ! protected: ! ! //{{AFX_MSG(MyDialog2) ! afx_msg void OnOK(); ! afx_msg void OnCancel(); ! afx_msg void OnHScroll(UINT nSBCode, UINT nPos, CScrollBar* pScrollBar); ! virtual BOOL OnInitDialog(); ! afx_msg void OnHystCheck(); ! afx_msg void OnOpenButton(); ! afx_msg void OnSaveButton(); ! afx_msg void OnResetButton(); ! afx_msg void OnEtxCheck(); ! afx_msg void OnEtxRadio1(); ! afx_msg void OnEtxRadio2(); ! afx_msg void OnKillfocusEtxWinSize(); ! //}}AFX_MSG ! DECLARE_MESSAGE_MAP() ! ! CFont EditFont; ! ! int DebugLevel; ! void SetDebugLevel(int); ! ! void Reset(void); ! ! void OnEtxCheckWorker(void); ! }; ! ! //{{AFX_INSERT_LOCATION}} ! ! #endif Index: TrayIcon.h =================================================================== RCS file: /cvsroot/olsrd/olsrd-current/gui/win32/Main/TrayIcon.h,v retrieving revision 1.1 retrieving revision 1.2 diff -C2 -d -r1.1 -r1.2 *** TrayIcon.h 17 Jan 2005 11:52:36 -0000 1.1 --- TrayIcon.h 27 Mar 2007 03:01:07 -0000 1.2 *************** *** 1,31 **** ! #ifndef TRAYICON_H_171149531 ! #define TRAYICON_H_171149531 ! ! class CFrontendDlg; ! ! class TrayIcon ! { ! public: ! TrayIcon( CFrontendDlg&, HINSTANCE ); ! ~TrayIcon(); ! ! void displayPopup(); ! ! static TrayIcon* getInstance() { return instance; } ! ! enum status { CONNECTED, ON, OFF }; ! ! void setStatus( status con_status, const char* message ); ! ! private: ! void setTrayAppearance( bool, unsigned int, const char* message ); ! ! HINSTANCE hInst; ! ! CFrontendDlg& main_dlg; ! ! friend LRESULT CALLBACK TrayIconProc( HWND, UINT, WPARAM, LPARAM ); ! static TrayIcon* instance; ! }; ! ! #endif // TRAYICON_H_171149531 --- 1,31 ---- ! #ifndef TRAYICON_H_171149531 ! #define TRAYICON_H_171149531 ! ! class CFrontendDlg; ! ! class TrayIcon ! { ! public: ! TrayIcon( CFrontendDlg&, HINSTANCE ); ! ~TrayIcon(); ! ! void displayPopup(); ! ! static TrayIcon* getInstance() { return instance; } ! ! enum status { CONNECTED, ON, OFF }; ! ! void setStatus( status con_status, const char* message ); ! ! private: ! void setTrayAppearance( bool, unsigned int, const char* message ); ! ! HINSTANCE hInst; ! ! CFrontendDlg& main_dlg; ! ! friend LRESULT CALLBACK TrayIconProc( HWND, UINT, WPARAM, LPARAM ); ! static TrayIcon* instance; ! }; ! ! #endif // TRAYICON_H_171149531 Index: StdAfx.h =================================================================== RCS file: /cvsroot/olsrd/olsrd-current/gui/win32/Main/StdAfx.h,v retrieving revision 1.3 retrieving revision 1.4 diff -C2 -d -r1.3 -r1.4 *** StdAfx.h 21 Nov 2004 01:21:10 -0000 1.3 --- StdAfx.h 27 Mar 2007 03:01:07 -0000 1.4 *************** *** 1,63 **** ! /* ! * The olsr.org Optimized Link-State Routing daemon (olsrd) ! * Copyright (c) 2004, Thomas Lopatic (thomas at lopatic.de) ! * All rights reserved. ! * ! * Redistribution and use in source and binary forms, with or without ! * modification, are permitted provided that the following conditions ! * are met: ! * ! * * Redistributions of source code must retain the above copyright ! * notice, this list of conditions and the following disclaimer. ! * * Redistributions in binary form must reproduce the above copyright ! * notice, this list of conditions and the following disclaimer in ! * the documentation and/or other materials provided with the ! * distribution. ! * * Neither the name of olsr.org, olsrd nor the names of its ! * contributors may be used to endorse or promote products derived ! * from this software without specific prior written permission. ! * ! * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS ! * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT ! * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS ! * FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE ! * COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, ! * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, ! * BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; ! * LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER ! * CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT ! * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ! * ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE ! * POSSIBILITY OF SUCH DAMAGE. ! * ! * Visit http://www.olsr.org for more information. ! * ! * If you find this software useful feel free to make a donation ! * to the project. For more information see the website or contact ! * the copyright holders. ! * ! * $Id$ ! */ ! ! #if !defined(AFX_STDAFX_H__6D907246_27D7_4991_B71E_C1105DD65FBC__INCLUDED_) ! #define AFX_STDAFX_H__6D907246_27D7_4991_B71E_C1105DD65FBC__INCLUDED_ ! ! #if _MSC_VER > 1000 ! #pragma once ! #endif ! ! #define VC_EXTRALEAN ! ! #include ! #include ! #include ! #include ! #include ! #include ! ! #include ! #include ! ! //{{AFX_INSERT_LOCATION}} ! ! #endif --- 1,55 ---- ! #pragma once ! ! #ifndef _SECURE_ATL ! #define _SECURE_ATL 1 ! #endif ! ! #ifndef VC_EXTRALEAN ! #define VC_EXTRALEAN ! #endif ! ! #ifndef WINVER ! #define WINVER 0x0501 ! #endif ! ! #ifndef _WIN32_WINNT ! #define _WIN32_WINNT 0x0501 ! #endif ! ! #ifndef _WIN32_WINDOWS ! #define _WIN32_WINDOWS 0x0410 ! #endif ! ! #ifndef _WIN32_IE ! #define _WIN32_IE 0x0600 ! #endif ! ! #define _ATL_CSTRING_EXPLICIT_CONSTRUCTORS ! ! #define _AFX_ALL_WARNINGS ! ! #include ! #include ! #include ! #include ! #include ! #include ! ! #ifndef _AFX_NO_OLE_SUPPORT ! #include ! #endif ! #ifndef _AFX_NO_AFXCMN_SUPPORT ! #include ! #endif ! ! #ifdef _UNICODE ! #if defined _M_IX86 ! #pragma comment(linker,"/manifestdependency:\"type='win32' name='Microsoft.Windows.Common-Controls' version='6.0.0.0' processorArchitecture='x86' publicKeyToken='6595b64144ccf1df' language='*'\"") ! #elif defined _M_IA64 ! #pragma comment(linker,"/manifestdependency:\"type='win32' name='Microsoft.Windows.Common-Controls' version='6.0.0.0' processorArchitecture='ia64' publicKeyToken='6595b64144ccf1df' language='*'\"") ! #elif defined _M_X64 ! #pragma comment(linker,"/manifestdependency:\"type='win32' name='Microsoft.Windows.Common-Controls' version='6.0.0.0' processorArchitecture='amd64' publicKeyToken='6595b64144ccf1df' language='*'\"") ! #else ! #pragma comment(linker,"/manifestdependency:\"type='win32' name='Microsoft.Windows.Common-Controls' version='6.0.0.0' processorArchitecture='*' publicKeyToken='6595b64144ccf1df' language='*'\"") ! #endif ! #endif Index: StdAfx.cpp =================================================================== RCS file: /cvsroot/olsrd/olsrd-current/gui/win32/Main/StdAfx.cpp,v retrieving revision 1.3 retrieving revision 1.4 diff -C2 -d -r1.3 -r1.4 *** StdAfx.cpp 21 Nov 2004 01:21:10 -0000 1.3 --- StdAfx.cpp 27 Mar 2007 03:01:07 -0000 1.4 *************** *** 1,45 **** ! /* ! * The olsr.org Optimized Link-State Routing daemon (olsrd) ! * Copyright (c) 2004, Thomas Lopatic (thomas at lopatic.de) ! * All rights reserved. ! * ! * Redistribution and use in source and binary forms, with or without ! * modification, are permitted provided that the following conditions ! * are met: ! * ! * * Redistributions of source code must retain the above copyright ! * notice, this list of conditions and the following disclaimer. ! * * Redistributions in binary form must reproduce the above copyright ! * notice, this list of conditions and the following disclaimer in ! * the documentation and/or other materials provided with the ! * distribution. ! * * Neither the name of olsr.org, olsrd nor the names of its ! * contributors may be used to endorse or promote products derived ! * from this software without specific prior written permission. ! * ! * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS ! * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT ! * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS ! * FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE ! * COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, ! * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, ! * BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; ! * LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER ! * CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT ! * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ! * ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE ! * POSSIBILITY OF SUCH DAMAGE. ! * ! * Visit http://www.olsr.org for more information. ! * ! * If you find this software useful feel free to make a donation ! * to the project. For more information see the website or contact ! * the copyright holders. ! * ! * $Id$ ! */ ! ! #include "stdafx.h" ! ! ! --- 1 ---- ! #include "stdafx.h" Index: LQ-Default.olsr =================================================================== RCS file: /cvsroot/olsrd/olsrd-current/gui/win32/Main/LQ-Default.olsr,v retrieving revision 1.1 retrieving revision 1.2 diff -C2 -d -r1.1 -r1.2 *** LQ-Default.olsr 31 Mar 2005 18:20:02 -0000 1.1 --- LQ-Default.olsr 27 Mar 2007 03:01:06 -0000 1.2 *************** *** 1,122 **** ! # ! # Default configuration for the GUI ! # ! # $Id$ ! # ! ! # ! # By default don't print anything to save CPU cycles ! # ! ! DebugLevel 0 ! ! # ! # Enable the link quality extensions? ! # ! # 0 - no ! # 1 - yes, use link quality for MPR selection ! # 2 - yes, use link quality for MPR selection and routing ! # ! ! LinkQualityLevel 2 ! ! # ! # Windows size for packet loss calculation ! # ! ! LinkQualityWinSize 10 ! ! # ! # Do not use hysteresis ! # ! ! UseHysteresis no ! ! # ! # If using hysteresis, use "smooth" parameters ! # ! ! HystScaling 0.1 ! HystThrHigh 0.8 ! HystThrLow 0.3 ! ! # ! # The pollrate used by the scheduler ! # ! ! Pollrate 0.1 ! ! # ! # Which neighbours should be advertised via TC messages? ! # ! # 0 - only advertise our MPR selectors ! # 1 - advertise our MPR selectors and our MPRs ! # 2 - advertise all neighbors ! # ! ! TcRedundancy 2 ! ! # ! # Specifies by how many MPRs each two-hop neighbour should be covered ! # ! ! MprCoverage 3 ! ! # ! # Load the HTTP info plugin ! # ! ! LoadPlugin "olsrd_httpinfo.dll" ! { ! PlParam "Net" "0.0.0.0 0.0.0.0" ! } ! ! # ! # This default gateway HNA will only be considered by the GUI if the ! # computer actually has a default route. ! # ! ! Hna4 ! { ! 0.0.0.0 0.0.0.0 ! } ! ! # ! # Pseudo interface used by the GUI. If we do not select any interface ! # in the GUI, we still have to store the per-interface settings of the ! # GUI somewhere. We then simply create a pseudo interfaced named GUI" ! # for storing this information. When parsing the configuration file, ! # the settings will be read and will be used to populate the GUI, but ! # after that the "GUI" interface will be discarded. ! # ! ! Interface "GUI" ! { ! # ! # HELLO interval and validity time in seconds (float) ! # ! ! HelloInterval 2.0 ! HelloValidityTime 20.0 ! ! # ! # TC interval and validity time in seconds (float) ! # ! ! TcInterval 5.0 ! TcValidityTime 30.0 ! ! # ! # MID interval and validity time in seconds (float) ! # ! ! MidInterval 5.0 ! MidValidityTime 30.0 ! ! # ! # HNA interval and validity time in seconds (float) ! # ! ! HnaInterval 5.0 ! HnaValidityTime 30.0 ! } --- 1,131 ---- ! # ! # Default configuration for the GUI ! # ! # $Id$ ! # ! ! # ! # By default don't print anything to save CPU cycles ! # ! ! DebugLevel 0 ! ! # ! # Enable the link quality extensions? ! # ! # 0 - no ! # 1 - yes, use link quality for MPR selection ! # 2 - yes, use link quality for MPR selection and routing ! # ! ! LinkQualityLevel 2 ! ! # ! # Enable the fish eye algorithm ! # ! # 0 - no ! # 1 - yes ! # ! ! LinkQualityFishEye 1 ! ! # ! # Windows size for packet loss calculation ! # ! ! LinkQualityWinSize 10 ! ! # ! # Do not use hysteresis ! # ! ! UseHysteresis no ! ! # ! # If using hysteresis, use "smooth" parameters ! # ! ! HystScaling 0.1 ! HystThrHigh 0.8 ! HystThrLow 0.3 ! ! # ! # The pollrate used by the scheduler ! # ! ! Pollrate 0.1 ! ! # ! # Which neighbours should be advertised via TC messages? ! # ! # 0 - only advertise our MPR selectors ! # 1 - advertise our MPR selectors and our MPRs ! # 2 - advertise all neighbors ! # ! ! TcRedundancy 2 ! ! # ! # Specifies by how many MPRs each two-hop neighbour should be covered ! # ! ! MprCoverage 3 ! ! # ! # Load the HTTP info plugin ! # ! ! LoadPlugin "olsrd_httpinfo.dll" ! { ! PlParam "Net" "0.0.0.0 0.0.0.0" ! } ! ! # ! # This default gateway HNA will only be considered by the GUI if the ! # computer actually has a default route. ! # ! ! Hna4 ! { ! 0.0.0.0 0.0.0.0 ! } ! ! # ! # Pseudo interface used by the GUI. If we do not select any interface ! # in the GUI, we still have to store the per-interface settings of the ! # GUI somewhere. We then simply create a pseudo interfaced named GUI" ! # for storing this information. When parsing the configuration file, ! # the settings will be read and will be used to populate the GUI, but ! # after that the "GUI" interface will be discarded. ! # ! ! Interface "GUI" ! { ! # ! # HELLO interval and validity time in seconds (float) ! # ! ! HelloInterval 2.0 ! HelloValidityTime 20.0 ! ! # ! # TC interval and validity time in seconds (float) ! # ! ! TcInterval 5.0 ! TcValidityTime 30.0 ! ! # ! # MID interval and validity time in seconds (float) ! # ! ! MidInterval 5.0 ! MidValidityTime 30.0 ! ! # ! # HNA interval and validity time in seconds (float) ! # ! ! HnaInterval 5.0 ! HnaValidityTime 30.0 ! } Index: NodeEntry.cpp =================================================================== RCS file: /cvsroot/olsrd/olsrd-current/gui/win32/Main/NodeEntry.cpp,v retrieving revision 1.3 retrieving revision 1.4 diff -C2 -d -r1.3 -r1.4 *** NodeEntry.cpp 21 Nov 2004 01:21:10 -0000 1.3 --- NodeEntry.cpp 27 Mar 2007 03:01:06 -0000 1.4 *************** *** 1,133 **** ! /* ! * The olsr.org Optimized Link-State Routing daemon (olsrd) ! * Copyright (c) 2004, Thomas Lopatic (thomas at lopatic.de) ! * All rights reserved. ! * ! * Redistribution and use in source and binary forms, with or without ! * modification, are permitted provided that the following conditions ! * are met: ! * ! * * Redistributions of source code must retain the above copyright ! * notice, this list of conditions and the following disclaimer. ! * * Redistributions in binary form must reproduce the above copyright ! * notice, this list of conditions and the following disclaimer in ! * the documentation and/or other materials provided with the ! * distribution. ! * * Neither the name of olsr.org, olsrd nor the names of its ! * contributors may be used to endorse or promote products derived ! * from this software without specific prior written permission. ! * ! * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS ! * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT ! * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS ! * FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE ! * COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, ! * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, ! * BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; ! * LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER ! * CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT ! * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ! * ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE ! * POSSIBILITY OF SUCH DAMAGE. ! * ! * Visit http://www.olsr.org for more information. ! * ! * If you find this software useful feel free to make a donation ! * to the project. For more information see the website or contact ! * the copyright holders. ! * ! * $Id$ ! */ ! ! #include "stdafx.h" ! #include "NodeEntry.h" ! ! class NodeEntry &NodeEntry::operator=(class NodeEntry &Src) ! { ! Addr = Src.Addr; ! Timeout = Src.Timeout; ! ! MprList.RemoveAll(); ! MprList.AddHead(&Src.MprList); ! ! HnaList.RemoveAll(); ! HnaList.AddHead(&Src.HnaList); ! ! MidList.RemoveAll(); ! MidList.AddHead(&Src.MidList); ! ! return *this; ! } ! ! BOOL NodeEntry::operator==(const class NodeEntry &Comp) const ! { ! return Addr == Comp.Addr; ! } ! ! void NodeEntry::AddMpr(unsigned int MprAddr, unsigned __int64 Timeout) ! { ! class MprEntry NewEntry; ! POSITION Pos; ! ! NewEntry.Addr = MprAddr; ! ! Pos = MprList.Find(NewEntry); ! ! if (Pos != NULL) ! { ! class MprEntry &OldEntry = MprList.GetAt(Pos); ! OldEntry.Timeout = Timeout; ! } ! ! else ! { ! NewEntry.Timeout = Timeout; ! MprList.AddTail(NewEntry); ! } ! } ! ! void NodeEntry::AddMid(unsigned int IntAddr, unsigned __int64 Timeout) ! { ! class MidEntry NewEntry; ! POSITION Pos; ! ! NewEntry.Addr = IntAddr; ! ! Pos = MidList.Find(NewEntry); ! ! if (Pos != NULL) ! { ! class MidEntry &OldEntry = MidList.GetAt(Pos); ! OldEntry.Timeout = Timeout; ! } ! ! else ! { ! NewEntry.Timeout = Timeout; ! MidList.AddTail(NewEntry); ! } ! } ! ! void NodeEntry::AddHna(unsigned int NetAddr, unsigned int NetMask, ! unsigned __int64 Timeout) ! { ! class HnaEntry NewEntry; ! POSITION Pos; ! ! NewEntry.Addr = NetAddr; ! NewEntry.Mask = NetMask; ! ! Pos = HnaList.Find(NewEntry); ! ! if (Pos != NULL) ! { ! class HnaEntry &OldEntry = HnaList.GetAt(Pos); ! OldEntry.Timeout = Timeout; ! } ! ! else ! { ! NewEntry.Timeout = Timeout; ! HnaList.AddTail(NewEntry); ! } ! } --- 1,133 ---- ! /* ! * The olsr.org Optimized Link-State Routing daemon (olsrd) ! * Copyright (c) 2004, Thomas Lopatic (thomas at lopatic.de) ! * All rights reserved. ! * ! * Redistribution and use in source and binary forms, with or without ! * modification, are permitted provided that the following conditions ! * are met: ! * ! * * Redistributions of source code must retain the above copyright ! * notice, this list of conditions and the following disclaimer. ! * * Redistributions in binary form must reproduce the above copyright ! * notice, this list of conditions and the following disclaimer in ! * the documentation and/or other materials provided with the ! * distribution. ! * * Neither the name of olsr.org, olsrd nor the names of its ! * contributors may be used to endorse or promote products derived ! * from this software without specific prior written permission. ! * ! * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS ! * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT ! * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS ! * FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE ! * COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, ! * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, ! * BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; ! * LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER ! * CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT ! * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ! * ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE ! * POSSIBILITY OF SUCH DAMAGE. ! * ! * Visit http://www.olsr.org for more information. ! * ! * If you find this software useful feel free to make a donation ! * to the project. For more information see the website or contact ! * the copyright holders. ! * ! * $Id$ ! */ ! ! #include "stdafx.h" ! #include "NodeEntry.h" ! ! class NodeEntry &NodeEntry::operator=(class NodeEntry &Src) ! { ! Addr = Src.Addr; ! Timeout = Src.Timeout; ! ! MprList.RemoveAll(); ! MprList.AddHead(&Src.MprList); ! ! HnaList.RemoveAll(); ! HnaList.AddHead(&Src.HnaList); ! ! MidList.RemoveAll(); ! MidList.AddHead(&Src.MidList); ! ! return *this; ! } ! ! BOOL NodeEntry::operator==(const class NodeEntry &Comp) const ! { ! return Addr == Comp.Addr; ! } ! ! void NodeEntry::AddMpr(unsigned int MprAddr, unsigned __int64 Timeout) ! { ! class MprEntry NewEntry; ! POSITION Pos; ! ! NewEntry.Addr = MprAddr; ! ! Pos = MprList.Find(NewEntry); ! ! if (Pos != NULL) ! { ! class MprEntry &OldEntry = MprList.GetAt(Pos); ! OldEntry.Timeout = Timeout; ! } ! ! else ! { ! NewEntry.Timeout = Timeout; ! MprList.AddTail(NewEntry); ! } ! } ! ! void NodeEntry::AddMid(unsigned int IntAddr, unsigned __int64 Timeout) ! { ! class MidEntry NewEntry; ! POSITION Pos; ! ! NewEntry.Addr = IntAddr; ! ! Pos = MidList.Find(NewEntry); ! ! if (Pos != NULL) ! { ! class MidEntry &OldEntry = MidList.GetAt(Pos); ! OldEntry.Timeout = Timeout; ! } ! ! else ! { ! NewEntry.Timeout = Timeout; ! MidList.AddTail(NewEntry); ! } ! } ! ! void NodeEntry::AddHna(unsigned int NetAddr, unsigned int NetMask, ! unsigned __int64 Timeout) ! { ! class HnaEntry NewEntry; ! POSITION Pos; ! ! NewEntry.Addr = NetAddr; ! NewEntry.Mask = NetMask; ! ! Pos = HnaList.Find(NewEntry); ! ! if (Pos != NULL) ! { ! class HnaEntry &OldEntry = HnaList.GetAt(Pos); ! OldEntry.Timeout = Timeout; ! } ! ! else ! { ! NewEntry.Timeout = Timeout; ! HnaList.AddTail(NewEntry); ! } ! } Index: MyTabCtrl.cpp =================================================================== RCS file: /cvsroot/olsrd/olsrd-current/gui/win32/Main/MyTabCtrl.cpp,v retrieving revision 1.4 retrieving revision 1.5 diff -C2 -d -r1.4 -r1.5 *** MyTabCtrl.cpp 21 Nov 2004 01:21:10 -0000 1.4 --- MyTabCtrl.cpp 27 Mar 2007 03:01:06 -0000 1.5 *************** *** 1,124 **** ! /* ! * The olsr.org Optimized Link-State Routing daemon (olsrd) ! * Copyright (c) 2004, Thomas Lopatic (thomas at lopatic.de) ! * All rights reserved. ! * ! * Redistribution and use in source and binary forms, with or without ! * modification, are permitted provided that the following conditions ! * are met: ! * ! * * Redistributions of source code must retain the above copyright ! * notice, this list of conditions and the following disclaimer. ! * * Redistributions in binary form must reproduce the above copyright ! * notice, this list of conditions and the following disclaimer in ! * the documentation and/or other materials provided with the ! * distribution. ! * * Neither the name of olsr.org, olsrd nor the names of its ! * contributors may be used to endorse or promote products derived ! * from this software without specific prior written permission. ! * ! * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS ! * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT ! * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS ! * FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE ! * COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, ! * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, ! * BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; ! * LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER ! * CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT ! * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ! * ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE ! * POSSIBILITY OF SUCH DAMAGE. ! * ! * Visit http://www.olsr.org for more information. ! * ! * If you find this software useful feel free to make a donation ! * to the project. For more information see the website or contact ! * the copyright holders. ! * ! * $Id$ ! */ ! ! #include "stdafx.h" ! #include "Frontend.h" ! #include "MyTabCtrl.h" ! ! #ifdef _DEBUG ! #define new DEBUG_NEW ! #undef THIS_FILE ! static char THIS_FILE[] = __FILE__; ! #endif ! ! MyTabCtrl::MyTabCtrl() ! { ! } ! ! MyTabCtrl::~MyTabCtrl() ! { ! } ! ! BEGIN_MESSAGE_MAP(MyTabCtrl, CTabCtrl) ! //{{AFX_MSG_MAP(MyTabCtrl) ! ON_NOTIFY_REFLECT(TCN_SELCHANGE, OnSelchange) ! //}}AFX_MSG_MAP ! END_MESSAGE_MAP() ! ! void MyTabCtrl::InitTabDialogs(CStringArray *Interfaces, ! CStringArray *Addresses, ! CStringArray *IsWlan) ! { ! int i; ! CRect Client; ! CRect Win; ! ! m_Dialog2.Interfaces = Interfaces; ! m_Dialog2.Addresses = Addresses; ! m_Dialog2.IsWlan = IsWlan; ! ! m_Dialog1.Create(GetParent()); ! m_Dialog2.Create(GetParent()); ! m_Dialog3.Create(GetParent()); ! m_Dialog4.Create(GetParent()); ! ! Dialogs[0] = &m_Dialog2; ! Dialogs[1] = &m_Dialog1; ! Dialogs[2] = &m_Dialog3; ! Dialogs[3] = &m_Dialog4; ! ! Sel = -1; ! ! for (i = 0; i < 4; i++) ! { ! GetClientRect(Client); ! AdjustRect(FALSE, Client); ! ! GetWindowRect(Win); ! GetParent()->ScreenToClient(Win); ! ! Client.OffsetRect(Win.left, Win.top); ! ! Dialogs[i]->SetWindowPos(&wndTop, Client.left, Client.top, ! Client.Width(), Client.Height(), SWP_HIDEWINDOW); ! } ! ! DisplayTabDialog(); ! } ! ! void MyTabCtrl::DisplayTabDialog() ! { ! if (Sel != -1) ! Dialogs[Sel]->ShowWindow(SW_HIDE); ! ! Sel = GetCurSel(); ! ! Dialogs[Sel]->ShowWindow(SW_SHOW); ! } ! ! void MyTabCtrl::OnSelchange(NMHDR* pNMHDR, LRESULT* pResult) ! { ! pNMHDR = pNMHDR; ! ! DisplayTabDialog(); ! ! *pResult = 0; ! } --- 1,124 ---- ! /* ! * The olsr.org Optimized Link-State Routing daemon (olsrd) ! * Copyright (c) 2004, Thomas Lopatic (thomas at lopatic.de) ! * All rights reserved. ! * ! * Redistribution and use in source and binary forms, with or without ! * modification, are permitted provided that the following conditions ! * are met: ! * ! * * Redistributions of source code must retain the above copyright ! * notice, this list of conditions and the following disclaimer. ! * * Redistributions in binary form must reproduce the above copyright ! * notice, this list of conditions and the following disclaimer in ! * the documentation and/or other materials provided with the ! * distribution. ! * * Neither the name of olsr.org, olsrd nor the names of its ! * contributors may be used to endorse or promote products derived ! * from this software without specific prior written permission. ! * ! * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS ! * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT ! * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS ! * FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE ! * COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, ! * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, ! * BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; ! * LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER ! * CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT ! * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ! * ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE ! * POSSIBILITY OF SUCH DAMAGE. ! * ! * Visit http://www.olsr.org for more information. ! * ! * If you find this software useful feel free to make a donation ! * to the project. For more information see the website or contact ! * the copyright holders. ! * ! * $Id$ ! */ ! ! #include "stdafx.h" ! #include "Frontend.h" ! #include "MyTabCtrl.h" ! ! #ifdef _DEBUG ! #define new DEBUG_NEW ! #undef THIS_FILE ! static char THIS_FILE[] = __FILE__; ! #endif ! ! MyTabCtrl::MyTabCtrl() ! { ! } ! ! MyTabCtrl::~MyTabCtrl() ! { ! } ! ! BEGIN_MESSAGE_MAP(MyTabCtrl, CTabCtrl) ! //{{AFX_MSG_MAP(MyTabCtrl) ! ON_NOTIFY_REFLECT(TCN_SELCHANGE, OnSelchange) ! //}}AFX_MSG_MAP ! END_MESSAGE_MAP() ! ! void MyTabCtrl::InitTabDialogs(CStringArray *Interfaces, ! CStringArray *Addresses, ! CStringArray *IsWlan) ! { ! int i; ! CRect Client; ! CRect Win; ! ! m_Dialog2.Interfaces = Interfaces; ! m_Dialog2.Addresses = Addresses; ! m_Dialog2.IsWlan = IsWlan; ! ! m_Dialog1.Create(GetParent()); ! m_Dialog2.Create(GetParent()); ! m_Dialog3.Create(GetParent()); ! m_Dialog4.Create(GetParent()); ! ! Dialogs[0] = &m_Dialog2; ! Dialogs[1] = &m_Dialog1; ! Dialogs[2] = &m_Dialog3; ! Dialogs[3] = &m_Dialog4; ! ! Sel = -1; ! ! for (i = 0; i < 4; i++) ! { ! GetClientRect(Client); ! AdjustRect(FALSE, Client); ! ! GetWindowRect(Win); ! GetParent()->ScreenToClient(Win); ! ! Client.OffsetRect(Win.left, Win.top); ! ! Dialogs[i]->SetWindowPos(&wndTop, Client.left, Client.top, ! Client.Width(), Client.Height(), SWP_HIDEWINDOW); ! } ! ! DisplayTabDialog(); ! } ! ! void MyTabCtrl::DisplayTabDialog() ! { ! if (Sel != -1) ! Dialogs[Sel]->ShowWindow(SW_HIDE); ! ! Sel = GetCurSel(); ! ! Dialogs[Sel]->ShowWindow(SW_SHOW); ! } ! ! void MyTabCtrl::OnSelchange(NMHDR* pNMHDR, LRESULT* pResult) ! { ! pNMHDR = pNMHDR; ! ! DisplayTabDialog(); ! ! *pResult = 0; ! } Index: Frontend.h =================================================================== RCS file: /cvsroot/olsrd/olsrd-current/gui/win32/Main/Frontend.h,v retrieving revision 1.5 retrieving revision 1.6 diff -C2 -d -r1.5 -r1.6 *** Frontend.h 17 Jan 2005 11:52:36 -0000 1.5 --- Frontend.h 27 Mar 2007 03:01:06 -0000 1.6 *************** *** 1,81 **** ! /* ! * The olsr.org Optimized Link-State Routing daemon (olsrd) ! * Copyright (c) 2004, Thomas Lopatic (thomas at lopatic.de) ! * All rights reserved. ! * ! * Redistribution and use in source and binary forms, with or without ! * modification, are permitted provided that the following conditions ! * are met: ! * ! * * Redistributions of source code must retain the above copyright ! * notice, this list of conditions and the following disclaimer. ! * * Redistributions in binary form must reproduce the above copyright ! * notice, this list of conditions and the following disclaimer in ! * the documentation and/or other materials provided with the ! * distribution. ! * * Neither the name of olsr.org, olsrd nor the names of its ! * contributors may be used to endorse or promote products derived ! * from this software without specific prior written permission. ! * ! * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS ! * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT ! * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS ! * FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE ! * COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, ! * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, ! * BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; ! * LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER ! * CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT ! * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ! * ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE ! * POSSIBILITY OF SUCH DAMAGE. ! * ! * Visit http://www.olsr.org for more information. ! * ! * If you find this software useful feel free to make a donation ! * to the project. For more information see the website or contact ! * the copyright holders. ! * ! * $Id$ ! */ ! ! #if !defined(AFX_FRONTEND_H__8033A41F_6FDC_4054_A582_AB7B6AC5EEAE__INCLUDED_) ! #define AFX_FRONTEND_H__8033A41F_6FDC_4054_A582_AB7B6AC5EEAE__INCLUDED_ ! ! #if _MSC_VER > 1000 ! #pragma once ! #endif ! ! #ifndef __AFXWIN_H__ ! #error include 'stdafx.h' before including this file for PCH ! #endif ! ! #include "resource.h" ! ! class TrayIcon; ! ! class CFrontendApp : public CWinApp ! { ! public: ! CFrontendApp(); ! ! int RedirectStdHandles(void); ! unsigned int RedirectThreadFunc(void); ! ! HANDLE OutRead; ! TrayIcon* tray_icon; ! ! //{{AFX_VIRTUAL(CFrontendApp) ! public: ! virtual BOOL InitInstance(); ! //}}AFX_VIRTUAL ! ! //{{AFX_MSG(CFrontendApp) ! //}}AFX_MSG ! DECLARE_MESSAGE_MAP() ! }; ! ! ! //{{AFX_INSERT_LOCATION}} ! ! #endif --- 1,81 ---- ! /* ! * The olsr.org Optimized Link-State Routing daemon (olsrd) ! * Copyright (c) 2004, Thomas Lopatic (thomas at lopatic.de) ! * All rights reserved. ! * ! * Redistribution and use in source and binary forms, with or without ! * modification, are permitted provided that the following conditions ! * are met: ! * ! * * Redistributions of source code must retain the above copyright ! * notice, this list of conditions and the following disclaimer. ! * * Redistributions in binary form must reproduce the above copyright ! * notice, this list of conditions and the following disclaimer in ! * the documentation and/or other materials provided with the ! * distribution. ! * * Neither the name of olsr.org, olsrd nor the names of its ! * contributors may be used to endorse or promote products derived ! * from this software without specific prior written permission. ! * ! * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS ! * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT ! * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS ! * FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE ! * COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, ! * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, ! * BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; ! * LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER ! * CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT ! * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ! * ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE ! * POSSIBILITY OF SUCH DAMAGE. ! * ! * Visit http://www.olsr.org for more information. ! * ! * If you find this software useful feel free to make a donation ! * to the project. For more information see the website or contact ! * the copyright holders. ! * ! * $Id$ ! */ ! ! #if !defined(AFX_FRONTEND_H__8033A41F_6FDC_4054_A582_AB7B6AC5EEAE__INCLUDED_) ! #define AFX_FRONTEND_H__8033A41F_6FDC_4054_A582_AB7B6AC5EEAE__INCLUDED_ ! ! #if _MSC_VER > 1000 ! #pragma once ! #endif ! ! #ifndef __AFXWIN_H__ ! #error include 'stdafx.h' before including this file for PCH ! #endif ! ! #include "resource.h" ! ! class TrayIcon; ! ! class CFrontendApp : public CWinApp ! { ! public: ! CFrontendApp(); ! ! int RedirectStdHandles(void); ! unsigned int RedirectThreadFunc(void); ! ! HANDLE OutRead; ! TrayIcon* tray_icon; ! ! //{{AFX_VIRTUAL(CFrontendApp) ! public: ! virtual BOOL InitInstance(); ! //}}AFX_VIRTUAL ! ! //{{AFX_MSG(CFrontendApp) ! //}}AFX_MSG ! DECLARE_MESSAGE_MAP() ! }; ! ! ! //{{AFX_INSERT_LOCATION}} ! ! #endif Index: MidEntry.cpp =================================================================== RCS file: /cvsroot/olsrd/olsrd-current/gui/win32/Main/MidEntry.cpp,v retrieving revision 1.3 retrieving revision 1.4 diff -C2 -d -r1.3 -r1.4 *** MidEntry.cpp 21 Nov 2004 01:21:10 -0000 1.3 --- MidEntry.cpp 27 Mar 2007 03:01:06 -0000 1.4 *************** *** 1,56 **** ! /* ! * The olsr.org Optimized Link-State Routing daemon (olsrd) ! * Copyright (c) 2004, Thomas Lopatic (thomas at lopatic.de) ! * All rights reserved. ! * ! * Redistribution and use in source and binary forms, with or without ! * modification, are permitted provided that the following conditions ! * are met: ! * ! * * Redistributions of source code must retain the above copyright ! * notice, this list of conditions and the following disclaimer. ! * * Redistributions in binary form must reproduce the above copyright ! * notice, this list of conditions and the following disclaimer in ! * the documentation and/or other materials provided with the ! * distribution. ! * * Neither the name of olsr.org, olsrd nor the names of its ! * contributors may be used to endorse or promote products derived ! * from this software without specific prior written permission. ! * ! * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS ! * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT ! * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS ! * FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE ! * COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, ! * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, ! * BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; ! * LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER ! * CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT ! * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ! * ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE ! * POSSIBILITY OF SUCH DAMAGE. ! * ! * Visit http://www.olsr.org for more information. ! * ! * If you find this software useful feel free to make a donation ! * to the project. For more information see the website or contact ! * the copyright holders. ! * ! * $Id$ ! */ ! ! #include "stdafx.h" ! #include "MidEntry.h" ! ! class MidEntry &MidEntry::operator=(class MidEntry &Src) ! { ! Addr = Src.Addr; ! Timeout = Src.Timeout; ! ! return *this; ! } ! ! BOOL MidEntry::operator==(const class MidEntry &Comp) const ! { ! return Addr == Comp.Addr; ! } --- 1,56 ---- ! /* ! * The olsr.org Optimized Link-State Routing daemon (olsrd) ! * Copyright (c) 2004, Thomas Lopatic (thomas at lopatic.de) ! * All rights reserved. ! * ! * Redistribution and use in source and binary forms, with or without ! * modification, are permitted provided that the following conditions ! * are met: ! * ! * * Redistributions of source code must retain the above copyright ! * notice, this list of conditions and the following disclaimer. ! * * Redistributions in binary form must reproduce the above copyright ! * notice, this list of conditions and the following disclaimer in ! * the documentation and/or other materials provided with the ! * distribution. ! * * Neither the name of olsr.org, olsrd nor the names of its ! * contributors may be used to endorse or promote products derived ! * from this software without specific prior written permission. ! * ! * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS ! * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT ! * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS ! * FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE ! * COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, ! * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, ! * BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; ! * LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER ! * CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT ! * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ! * ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE ! * POSSIBILITY OF SUCH DAMAGE. ! * ! * Visit http://www.olsr.org for more information. ! * ! * If you find this software useful feel free to make a donation ! * to the project. For more information see the website or contact ! * the copyright holders. ! * ! * $Id$ ! */ ! ! #include "stdafx.h" ! #include "MidEntry.h" ! ! class MidEntry &MidEntry::operator=(class MidEntry &Src) ! { ! Addr = Src.Addr; ! Timeout = Src.Timeout; ! ! return *this; ! } ! ! BOOL MidEntry::operator==(const class MidEntry &Comp) const ! { ! return Addr == Comp.Addr; ! } Index: MyDialog2.cpp =================================================================== RCS file: /cvsroot/olsrd/olsrd-current/gui/win32/Main/MyDialog2.cpp,v retrieving revision 1.8 retrieving revision 1.9 diff -C2 -d -r1.8 -r1.9 *** MyDialog2.cpp 2 Mar 2005 00:13:23 -0000 1.8 --- MyDialog2.cpp 27 Mar 2007 03:01:06 -0000 1.9 *************** *** 1,692 **** ! /* ! * The olsr.org Optimized Link-State Routing daemon (olsrd) ! * Copyright (c) 2004, Thomas Lopatic (thomas at lopatic.de) ! * All rights reserved. ! * ! * Redistribution and use in source and binary forms, with or without ! * modification, are permitted provided that the following conditions ! * are met: ! * ! * * Redistributions of source code must retain the above copyright [...1365 lines suppressed...] ! m_EtxRadio1.SetCheck(FALSE); ! } ! ! void MyDialog2::OnKillfocusEtxWinSize() ! { ! CString Conv; ! int WinSize; ! ! m_EtxWindowSize.GetWindowText(Conv); ! WinSize = atoi(Conv); ! ! if (WinSize < 3) ! WinSize = 3; ! ! else if (WinSize > 128) ! WinSize = 128; ! ! Conv.Format("%d", WinSize); ! m_EtxWindowSize.SetWindowText(Conv); ! } Index: Ipc.h =================================================================== RCS file: /cvsroot/olsrd/olsrd-current/gui/win32/Main/Ipc.h,v retrieving revision 1.5 retrieving revision 1.6 diff -C2 -d -r1.5 -r1.6 *** Ipc.h 5 Dec 2004 20:37:18 -0000 1.5 --- Ipc.h 27 Mar 2007 03:01:06 -0000 1.6 *************** *** 1,136 **** ! /* ! * The olsr.org Optimized Link-State Routing daemon (olsrd) ! * Copyright (c) 2004, Thomas Lopatic (thomas at lopatic.de) ! * All rights reserved. ! * ! * Redistribution and use in source and binary forms, with or without ! * modification, are permitted provided that the following conditions ! * are met: ! * ! * * Redistributions of source code must retain the above copyright ! * notice, this list of conditions and the following disclaimer. ! * * Redistributions in binary form must reproduce the above copyright ! * notice, this list of conditions and the following disclaimer in ! * the documentation and/or other materials provided with the ! * distribution. ! * * Neither the name of olsr.org, olsrd nor the names of its ! * contributors may be used to endorse or promote products derived ! * from this software without specific prior written permission. ! * ! * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS ! * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT ! * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS ! * FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE ! * COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, ! * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, ! * BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; ! * LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER ! * CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT ! * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ! * ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE ! * POSSIBILITY OF SUCH DAMAGE. ! * ! * Visit http://www.olsr.org for more information. ! * ! * If you find this software useful feel free to make a donation ! * to the project. For more information see the website or contact ! * the copyright holders. ! * ! * $Id$ ! */ ! ! #if !defined TL_IPC_H ! #define TL_IPC_H ! ! #define MSG_TYPE_OLSR_HELLO 1 ! #define MSG_TYPE_OLSR_TC 2 ! #define MSG_TYPE_OLSR_MID 3 ! #define MSG_TYPE_OLSR_HNA 4 ! #define MSG_TYPE_OLSR_LQ_HELLO 201 ! #define MSG_TYPE_OLSR_LQ_TC 202 ! ! #define MSG_TYPE_IPC_ROUTE 11 ! #define MSG_TYPE_IPC_CONFIG 12 ! ! #pragma pack(push, BeforeIpcMessages, 1) ! ! struct OlsrHeader ! { ! unsigned char Type; ! unsigned char VTime; ! unsigned short Size; ! unsigned int Orig; ! unsigned char Ttl; ! unsigned char Hops; ! unsigned short SeqNo; ! }; ! ! struct OlsrHello ! { ! struct OlsrHeader Header; ! ! unsigned short Reserved; ! unsigned char HTime; ! unsigned char Will; ! }; ! ! struct OlsrHelloLink ! { ! unsigned char LinkCode; ! unsigned char Reserved; ! unsigned short Size; ! }; ! ! struct OlsrTc ! { ! struct OlsrHeader Header; ! ! unsigned short Ansn; ! unsigned short Reserved; ! }; ! ! union IpcIpAddr ! { ! unsigned int v4; ! unsigned char v6[16]; ! }; ! ! struct IpcHeader ! { ! unsigned char Type; ! unsigned char Reserved; ! unsigned short Size; ! }; ! ! struct IpcRoute ! { ! struct IpcHeader Header; ! ! unsigned char Metric; ! unsigned char Add; ! unsigned char Reserved[2]; ! union IpcIpAddr Dest; ! union IpcIpAddr Gate; ! char Int[4]; ! }; ! ! struct IpcConfig ! { ! struct IpcHeader Header; ! ! unsigned char NumMid; ! unsigned char NumHna; ! unsigned char Reserved1[2]; ! unsigned short HelloInt; ! unsigned short WiredHelloInt; ! unsigned short TcInt; ! unsigned short HelloHold; ! unsigned short TcHold; ! unsigned char Ipv6; ! unsigned char Reserved2; ! IpcIpAddr MainAddr; ! }; ! ! #pragma pack (pop, BeforeIpcMessages) ! ! #endif --- 1,136 ---- ! /* ! * The olsr.org Optimized Link-State Routing daemon (olsrd) ! * Copyright (c) 2004, Thomas Lopatic (thomas at lopatic.de) ! * All rights reserved. ! * ! * Redistribution and use in source and binary forms, with or without ! * modification, are permitted provided that the following conditions ! * are met: ! * ! * * Redistributions of source code must retain the above copyright ! * notice, this list of conditions and the following disclaimer. ! * * Redistributions in binary form must reproduce the above copyright ! * notice, this list of conditions and the following disclaimer in ! * the documentation and/or other materials provided with the ! * distribution. ! * * Neither the name of olsr.org, olsrd nor the names of its ! * contributors may be used to endorse or promote products derived ! * from this software without specific prior written permission. ! * ! * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS ! * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT ! * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS ! * FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE ! * COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, ! * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, ! * BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; ! * LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER ! * CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT ! * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ! * ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE ! * POSSIBILITY OF SUCH DAMAGE. ! * ! * Visit http://www.olsr.org for more information. ! * ! * If you find this software useful feel free to make a donation ! * to the project. For more information see the website or contact ! * the copyright holders. ! * ! * $Id$ ! */ ! ! #if !defined TL_IPC_H ! #define TL_IPC_H ! ! #define MSG_TYPE_OLSR_HELLO 1 ! #define MSG_TYPE_OLSR_TC 2 ! #define MSG_TYPE_OLSR_MID 3 ! #define MSG_TYPE_OLSR_HNA 4 ! #define MSG_TYPE_OLSR_LQ_HELLO 201 ! #define MSG_TYPE_OLSR_LQ_TC 202 ! ! #define MSG_TYPE_IPC_ROUTE 11 ! #define MSG_TYPE_IPC_CONFIG 12 ! ! #pragma pack(push, BeforeIpcMessages, 1) ! ! struct OlsrHeader ! { ! unsigned char Type; ! unsigned char VTime; ! unsigned short Size; ! unsigned int Orig; ! unsigned char Ttl; ! unsigned char Hops; ! unsigned short SeqNo; ! }; ! ! struct OlsrHello ! { ! struct OlsrHeader Header; ! ! unsigned short Reserved; ! unsigned char HTime; ! unsigned char Will; ! }; ! ! struct OlsrHelloLink ! { ! unsigned char LinkCode; ! unsigned char Reserved; ! unsigned short Size; ! }; ! ! struct OlsrTc ! { ! struct OlsrHeader Header; ! ! unsigned short Ansn; ! unsigned short Reserved; ! }; ! ! union IpcIpAddr ! { ! unsigned int v4; ! unsigned char v6[16]; ! }; ! ! struct IpcHeader ! { ! unsigned char Type; ! unsigned char Reserved; ! unsigned short Size; ! }; ! ! struct IpcRoute ! { ! struct IpcHeader Header; ! ! unsigned char Metric; ! unsigned char Add; ! unsigned char Reserved[2]; ! union IpcIpAddr Dest; ! union IpcIpAddr Gate; ! char Int[4]; ! }; ! ! struct IpcConfig ! { ! struct IpcHeader Header; ! ! unsigned char NumMid; ! unsigned char NumHna; ! unsigned char Reserved1[2]; ! unsigned short HelloInt; ! unsigned short WiredHelloInt; ! unsigned short TcInt; ! unsigned short HelloHold; ! unsigned short TcHold; ! unsigned char Ipv6; ! unsigned char Reserved2; ! IpcIpAddr MainAddr; ! }; ! ! #pragma pack (pop, BeforeIpcMessages) ! ! #endif From (spam-protected) Tue Mar 27 13:08:10 2007 From: (spam-protected) (Thomas Lopatic) Date: Tue, 27 Mar 2007 11:08:10 +0000 Subject: [Olsr-cvs] olsrd-current/src/win32 kernel_routes.c,1.16,1.17 Message-ID: Update of /cvsroot/olsrd/olsrd-current/src/win32 In directory sc8-pr-cvs3.sourceforge.net:/tmp/cvs-serv29814 Modified Files: kernel_routes.c Log Message: Don't report legitimate ERROR_NOT_FOUND when updating routes. Index: kernel_routes.c =================================================================== RCS file: /cvsroot/olsrd/olsrd-current/src/win32/kernel_routes.c,v retrieving revision 1.16 retrieving revision 1.17 diff -C2 -d -r1.16 -r1.17 *** kernel_routes.c 26 Mar 2007 15:33:44 -0000 1.16 --- kernel_routes.c 27 Mar 2007 11:08:08 -0000 1.17 *************** *** 86,92 **** Res = SetIpForwardEntry(&Row); ! if (Res != NO_ERROR) { fprintf(stderr, "SetIpForwardEntry() = %08lx, %s", Res, StrError(Res)); Res = CreateIpForwardEntry(&Row); } --- 86,93 ---- Res = SetIpForwardEntry(&Row); ! if (Res != NO_ERROR && Res != ERROR_NOT_FOUND) { fprintf(stderr, "SetIpForwardEntry() = %08lx, %s", Res, StrError(Res)); + Res = CreateIpForwardEntry(&Row); } From (spam-protected) Tue Mar 27 21:37:16 2007 From: (spam-protected) (Thomas Lopatic) Date: Tue, 27 Mar 2007 19:37:16 +0000 Subject: [Olsr-cvs] olsrd-current/src lq_avl.c,1.5,1.6 lq_avl.h,1.6,1.7 Message-ID: Update of /cvsroot/olsrd/olsrd-current/src In directory sc8-pr-cvs3.sourceforge.net:/tmp/cvs-serv13547/src Modified Files: lq_avl.c lq_avl.h Log Message: Modify linked list when inserting a node into or removing a node from the tree. Index: lq_avl.h =================================================================== RCS file: /cvsroot/olsrd/olsrd-current/src/lq_avl.h,v retrieving revision 1.6 retrieving revision 1.7 diff -C2 -d -r1.6 -r1.7 *** lq_avl.h 27 Mar 2007 00:45:15 -0000 1.6 --- lq_avl.h 27 Mar 2007 19:37:13 -0000 1.7 *************** *** 51,54 **** --- 51,55 ---- struct avl_node *right; struct avl_node *next; + struct avl_node *prev; void *key; void *data; *************** *** 65,69 **** int avl_insert(struct avl_tree *, struct avl_node *); void avl_delete(struct avl_tree *, struct avl_node *); ! struct avl_node *avl_walk_init(struct avl_tree *); struct avl_node *avl_walk_next(struct avl_node *); --- 66,70 ---- int avl_insert(struct avl_tree *, struct avl_node *); void avl_delete(struct avl_tree *, struct avl_node *); ! struct avl_node *avl_walk_first(struct avl_tree *); struct avl_node *avl_walk_next(struct avl_node *); Index: lq_avl.c =================================================================== RCS file: /cvsroot/olsrd/olsrd-current/src/lq_avl.c,v retrieving revision 1.5 retrieving revision 1.6 diff -C2 -d -r1.5 -r1.6 *** lq_avl.c 27 Mar 2007 00:45:15 -0000 1.5 --- lq_avl.c 27 Mar 2007 19:37:13 -0000 1.6 *************** *** 242,245 **** --- 242,276 ---- } + static void insert_before(struct avl_node *pos_node, struct avl_node *node) + { + if (pos_node->prev != NULL) + pos_node->prev->next = node; + + node->prev = pos_node->prev; + node->next = pos_node; + + pos_node->prev = node; + } + + static void insert_after(struct avl_node *pos_node, struct avl_node *node) + { + if (pos_node->next != NULL) + pos_node->next->prev = node; + + node->prev = pos_node; + node->next = pos_node->next; + + pos_node->next = node; + } + + static void remove(struct avl_node *node) + { + if (node->prev != NULL) + node->prev->next = node->next; + + if (node->next != NULL) + node->next->prev = node->prev; + } + int avl_insert(struct avl_tree *tree, struct avl_node *new) { *************** *** 251,254 **** --- 282,288 ---- new->right = NULL; + new->next = NULL; + new->prev = NULL; + if (tree->root == NULL) { *************** *** 271,274 **** --- 305,310 ---- if (node->balance == 1) { + insert_before(node, new); + node->balance = 0; new->parent = node; *************** *** 279,282 **** --- 315,320 ---- if (node->balance == -1) { + insert_after(node, new); + node->balance = 0; new->parent = node; *************** *** 287,290 **** --- 325,330 ---- if (diff < 0) { + insert_before(node, new); + node->balance = -1; new->parent = node; *************** *** 294,297 **** --- 334,339 ---- } + insert_after(node, new); + node->balance = 1; new->parent = node; *************** *** 533,536 **** --- 575,579 ---- { delete_worker(tree, node); + remove(node); node->balance = 0xdeadbeef; *************** *** 544,567 **** } ! static struct avl_node *walk_init_rec(struct avl_node *node, struct avl_node *tail) ! { ! if (node == NULL) ! return tail; ! ! tail = walk_init_rec(node->left, tail); ! ! node->next = NULL; ! ! if (tail != NULL) ! tail->next = node; ! ! tail = node; ! ! tail = walk_init_rec(node->right, tail); ! ! return tail; ! } ! ! struct avl_node *avl_walk_init(struct avl_tree *tree) { struct avl_node *node = tree->root; --- 587,591 ---- } ! struct avl_node *avl_walk_first(struct avl_tree *tree) { struct avl_node *node = tree->root; *************** *** 570,575 **** return NULL; - walk_init_rec(node, NULL); - return local_min(node); } --- 594,597 ---- From (spam-protected) Wed Mar 28 00:02:24 2007 From: (spam-protected) (Thomas Lopatic) Date: Tue, 27 Mar 2007 22:02:24 +0000 Subject: [Olsr-cvs] olsrd-current/src lq_avl.c,1.6,1.7 Message-ID: Update of /cvsroot/olsrd/olsrd-current/src In directory sc8-pr-cvs3.sourceforge.net:/tmp/cvs-serv6828/src Modified Files: lq_avl.c Log Message: Eliminated tail recursion. Index: lq_avl.c =================================================================== RCS file: /cvsroot/olsrd/olsrd-current/src/lq_avl.c,v retrieving revision 1.6 retrieving revision 1.7 diff -C2 -d -r1.6 -r1.7 *** lq_avl.c 27 Mar 2007 19:37:13 -0000 1.6 --- lq_avl.c 27 Mar 2007 22:02:22 -0000 1.7 *************** *** 411,420 **** } ! static struct avl_node *local_min(struct avl_node *node) { ! if (node->left == NULL) ! return node; ! return local_min(node->left); } --- 411,420 ---- } ! static inline struct avl_node *local_min(struct avl_node *node) { ! while (node->left != NULL) ! node = node->left; ! return node; } From (spam-protected) Wed Mar 28 13:19:01 2007 From: (spam-protected) (Thomas Lopatic) Date: Wed, 28 Mar 2007 11:19:01 +0000 Subject: [Olsr-cvs] olsrd-current/gui/win32/Shim Shim.vcproj,1.1,1.2 Message-ID: Update of /cvsroot/olsrd/olsrd-current/gui/win32/Shim In directory sc8-pr-cvs3.sourceforge.net:/tmp/cvs-serv7562 Modified Files: Shim.vcproj Log Message: Statically link shim. Index: Shim.vcproj =================================================================== RCS file: /cvsroot/olsrd/olsrd-current/gui/win32/Shim/Shim.vcproj,v retrieving revision 1.1 retrieving revision 1.2 diff -C2 -d -r1.1 -r1.2 *** Shim.vcproj 27 Mar 2007 03:01:08 -0000 1.1 --- Shim.vcproj 28 Mar 2007 11:18:59 -0000 1.2 *************** *** 44,48 **** MinimalRebuild="true" BasicRuntimeChecks="3" ! RuntimeLibrary="3" UsePrecompiledHeader="0" WarningLevel="3" --- 44,48 ---- MinimalRebuild="true" BasicRuntimeChecks="3" ! RuntimeLibrary="1" UsePrecompiledHeader="0" WarningLevel="3" *************** *** 118,122 **** Name="VCCLCompilerTool" PreprocessorDefinitions="WIN32;NDEBUG;_CONSOLE" ! RuntimeLibrary="2" UsePrecompiledHeader="0" WarningLevel="3" --- 118,122 ---- Name="VCCLCompilerTool" PreprocessorDefinitions="WIN32;NDEBUG;_CONSOLE" ! RuntimeLibrary="0" UsePrecompiledHeader="0" WarningLevel="3" From (spam-protected) Wed Mar 28 14:07:07 2007 From: (spam-protected) (Thomas Lopatic) Date: Wed, 28 Mar 2007 12:07:07 +0000 Subject: [Olsr-cvs] olsrd-current/src/win32 kernel_routes.c,1.17,1.18 Message-ID: Update of /cvsroot/olsrd/olsrd-current/src/win32 In directory sc8-pr-cvs3.sourceforge.net:/tmp/cvs-serv26103 Modified Files: kernel_routes.c Log Message: Fixed route addition. Index: kernel_routes.c =================================================================== RCS file: /cvsroot/olsrd/olsrd-current/src/win32/kernel_routes.c,v retrieving revision 1.17 retrieving revision 1.18 diff -C2 -d -r1.17 -r1.18 *** kernel_routes.c 27 Mar 2007 11:08:08 -0000 1.17 --- kernel_routes.c 28 Mar 2007 12:07:05 -0000 1.18 *************** *** 86,92 **** Res = SetIpForwardEntry(&Row); ! if (Res != NO_ERROR && Res != ERROR_NOT_FOUND) { ! fprintf(stderr, "SetIpForwardEntry() = %08lx, %s", Res, StrError(Res)); Res = CreateIpForwardEntry(&Row); --- 86,93 ---- Res = SetIpForwardEntry(&Row); ! if (Res != NO_ERROR) { ! if (Res != ERROR_NOT_FOUND) ! fprintf(stderr, "SetIpForwardEntry() = %08lx, %s", Res, StrError(Res)); Res = CreateIpForwardEntry(&Row); From (spam-protected) Wed Mar 28 16:37:02 2007 From: (spam-protected) (Thomas Lopatic) Date: Wed, 28 Mar 2007 14:37:02 +0000 Subject: [Olsr-cvs] olsrd-current/gui/win32/Main trustInfo.manifest, NONE, 1.1 Main.vcproj, 1.1, 1.2 Message-ID: Update of /cvsroot/olsrd/olsrd-current/gui/win32/Main In directory sc8-pr-cvs3.sourceforge.net:/tmp/cvs-serv22478 Modified Files: Main.vcproj Added Files: trustInfo.manifest Log Message: Request administrative privileges on Vista. Index: Main.vcproj =================================================================== RCS file: /cvsroot/olsrd/olsrd-current/gui/win32/Main/Main.vcproj,v retrieving revision 1.1 retrieving revision 1.2 diff -C2 -d -r1.1 -r1.2 *** Main.vcproj 27 Mar 2007 03:01:07 -0000 1.1 --- Main.vcproj 28 Mar 2007 14:36:59 -0000 1.2 *************** *** 167,170 **** --- 167,171 ---- - - --- 363,371 ---- --- NEW FILE: trustInfo.manifest --- From (spam-protected) Wed Mar 28 16:49:17 2007 From: (spam-protected) (Thomas Lopatic) Date: Wed, 28 Mar 2007 14:49:17 +0000 Subject: [Olsr-cvs] olsrd-current/gui/win32/Shim Shim.vcproj, 1.2, 1.3 shim.c, 1.5, 1.6 Message-ID: Update of /cvsroot/olsrd/olsrd-current/gui/win32/Shim In directory sc8-pr-cvs3.sourceforge.net:/tmp/cvs-serv27911 Modified Files: Shim.vcproj shim.c Log Message: Use main() instead of custom entry point. Index: shim.c =================================================================== RCS file: /cvsroot/olsrd/olsrd-current/gui/win32/Shim/shim.c,v retrieving revision 1.5 retrieving revision 1.6 diff -C2 -d -r1.5 -r1.6 *** shim.c 27 Mar 2007 03:01:08 -0000 1.5 --- shim.c 28 Mar 2007 14:49:15 -0000 1.6 *************** *** 42,46 **** #include ! void EntryPoint(void) { STARTUPINFO StartInfo; --- 42,46 ---- #include ! int main(int argc, char *argv[]) { STARTUPINFO StartInfo; Index: Shim.vcproj =================================================================== RCS file: /cvsroot/olsrd/olsrd-current/gui/win32/Shim/Shim.vcproj,v retrieving revision 1.2 retrieving revision 1.3 diff -C2 -d -r1.2 -r1.3 *** Shim.vcproj 28 Mar 2007 11:18:59 -0000 1.2 --- Shim.vcproj 28 Mar 2007 14:49:15 -0000 1.3 *************** *** 64,68 **** GenerateDebugInformation="true" SubSystem="1" ! EntryPointSymbol="EntryPoint" TargetMachine="1" /> --- 64,68 ---- GenerateDebugInformation="true" SubSystem="1" ! EntryPointSymbol="" TargetMachine="1" /> *************** *** 140,144 **** OptimizeReferences="2" EnableCOMDATFolding="2" ! EntryPointSymbol="EntryPoint" TargetMachine="1" /> --- 140,144 ---- OptimizeReferences="2" EnableCOMDATFolding="2" ! EntryPointSymbol="" TargetMachine="1" /> From (spam-protected) Thu Mar 29 02:05:54 2007 From: (spam-protected) (Thomas Lopatic) Date: Thu, 29 Mar 2007 00:05:54 +0000 Subject: [Olsr-cvs] olsrd-current/src lq_avl.c, 1.7, 1.8 lq_avl.h, 1.7, 1.8 lq_route.c, 1.44, 1.45 Message-ID: Update of /cvsroot/olsrd/olsrd-current/src In directory sc8-pr-cvs3.sourceforge.net:/tmp/cvs-serv23810/src Modified Files: lq_avl.c lq_avl.h lq_route.c Log Message: Support multiple values per key. Index: lq_route.c =================================================================== RCS file: /cvsroot/olsrd/olsrd-current/src/lq_route.c,v retrieving revision 1.44 retrieving revision 1.45 diff -C2 -d -r1.44 -r1.45 *** lq_route.c 10 Feb 2007 17:36:51 -0000 1.44 --- lq_route.c 29 Mar 2007 00:05:50 -0000 1.45 *************** *** 109,113 **** list_init(&vert->edge_list); ! avl_insert(vertex_tree, &vert->tree_node); } } --- 109,113 ---- list_init(&vert->edge_list); ! avl_insert(vertex_tree, &vert->tree_node, 0); } } *************** *** 160,164 **** edge->etx = etx; ! avl_insert(&svert->edge_tree, &edge->tree_node); list_add_tail(&svert->edge_list, &edge->node); } --- 160,164 ---- edge->etx = etx; ! avl_insert(&svert->edge_tree, &edge->tree_node, 0); list_add_tail(&svert->edge_list, &edge->node); } *************** *** 180,184 **** edge->etx = etx; ! avl_insert(&dvert->edge_tree, &edge->tree_node); list_add_tail(&dvert->edge_list, &edge->node); } --- 180,184 ---- edge->etx = etx; ! avl_insert(&dvert->edge_tree, &edge->tree_node, 0); list_add_tail(&dvert->edge_list, &edge->node); } Index: lq_avl.h =================================================================== RCS file: /cvsroot/olsrd/olsrd-current/src/lq_avl.h,v retrieving revision 1.7 retrieving revision 1.8 diff -C2 -d -r1.7 -r1.8 *** lq_avl.h 27 Mar 2007 19:37:13 -0000 1.7 --- lq_avl.h 29 Mar 2007 00:05:50 -0000 1.8 *************** *** 46,50 **** struct avl_node { - int balance; struct avl_node *parent; struct avl_node *left; --- 46,49 ---- *************** *** 54,57 **** --- 53,58 ---- void *key; void *data; + char balance; + char leader; }; *************** *** 64,68 **** void avl_init(struct avl_tree *, int (*)(void *, void *)); struct avl_node *avl_find(struct avl_tree *, void *); ! int avl_insert(struct avl_tree *, struct avl_node *); void avl_delete(struct avl_tree *, struct avl_node *); struct avl_node *avl_walk_first(struct avl_tree *); --- 65,69 ---- void avl_init(struct avl_tree *, int (*)(void *, void *)); struct avl_node *avl_find(struct avl_tree *, void *); ! int avl_insert(struct avl_tree *, struct avl_node *, int); void avl_delete(struct avl_tree *, struct avl_node *); struct avl_node *avl_walk_first(struct avl_tree *); Index: lq_avl.c =================================================================== RCS file: /cvsroot/olsrd/olsrd-current/src/lq_avl.c,v retrieving revision 1.7 retrieving revision 1.8 diff -C2 -d -r1.7 -r1.8 *** lq_avl.c 27 Mar 2007 22:02:22 -0000 1.7 --- lq_avl.c 29 Mar 2007 00:05:50 -0000 1.8 *************** *** 273,282 **** } ! int avl_insert(struct avl_tree *tree, struct avl_node *new) { struct avl_node *node; int diff; ! new->balance = 0; new->left = NULL; new->right = NULL; --- 273,284 ---- } ! int avl_insert(struct avl_tree *tree, struct avl_node *new, int allow_duplicates) { struct avl_node *node; + struct avl_node *last; int diff; ! new->parent = NULL; ! new->left = NULL; new->right = NULL; *************** *** 285,291 **** new->prev = NULL; if (tree->root == NULL) { - new->parent = NULL; tree->root = new; return 0; --- 287,295 ---- new->prev = NULL; + new->balance = 0; + new->leader = 1; + if (tree->root == NULL) { tree->root = new; return 0; *************** *** 294,297 **** --- 298,306 ---- node = find_rec(tree->root, new->key, tree->comp); + last = node; + + while (last->next != NULL && last->next->leader == 0) + last = last->next; + if (0 == tree->comp) diff = inline_avl_comp_ipv4(new->key, node->key); *************** *** 301,305 **** if (diff == 0) ! return -1; if (node->balance == 1) --- 310,322 ---- if (diff == 0) ! { ! if (allow_duplicates == 0) ! return -1; ! ! new->leader = 0; ! ! insert_after(last, new); ! return 0; ! } if (node->balance == 1) *************** *** 315,319 **** if (node->balance == -1) { ! insert_after(node, new); node->balance = 0; --- 332,336 ---- if (node->balance == -1) { ! insert_after(last, new); node->balance = 0; *************** *** 334,338 **** } ! insert_after(node, new); node->balance = 1; --- 351,355 ---- } ! insert_after(last, new); node->balance = 1; *************** *** 574,588 **** void avl_delete(struct avl_tree *tree, struct avl_node *node) { ! delete_worker(tree, node); ! remove(node); ! node->balance = 0xdeadbeef; ! node->left = (struct avl_node *)0xdeadbeef; ! node->right = (struct avl_node *)0xdeadbeef; ! node->key = (void *)0xdeadbeef; ! node->data = (void *)0xdeadbeef; } --- 591,640 ---- void avl_delete(struct avl_tree *tree, struct avl_node *node) { ! struct avl_node *next; ! struct avl_node *parent; ! struct avl_node *left; ! struct avl_node *right; ! if (node->leader != 0) ! { ! next = node->next; ! if (next != NULL && next->leader == 0) ! { ! next->leader = 1; ! next->balance = node->balance; ! parent = node->parent; ! left = node->left; ! right = node->right; ! next->parent = parent; ! next->left = left; ! next->right = right; ! ! if (parent == NULL) ! tree->root = next; ! ! else ! { ! if (node == parent->left) ! parent->left = next; ! ! else ! parent->right = next; ! } ! ! if (left != NULL) ! left->parent = next; ! ! if (right != NULL) ! right->parent = next; ! } ! ! else ! delete_worker(tree, node); ! } ! ! remove(node); } From (spam-protected) Thu Mar 29 18:34:42 2007 From: (spam-protected) (Thomas Lopatic) Date: Thu, 29 Mar 2007 16:34:42 +0000 Subject: [Olsr-cvs] olsrd-current/src/win32 ifnet.c,1.33,1.34 Message-ID: Update of /cvsroot/olsrd/olsrd-current/src/win32 In directory sc8-pr-cvs3.sourceforge.net:/tmp/cvs-serv30016 Modified Files: ifnet.c Log Message: Increased maximal number of interfaces. Index: ifnet.c =================================================================== RCS file: /cvsroot/olsrd/olsrd-current/src/win32/ifnet.c,v retrieving revision 1.33 retrieving revision 1.34 diff -C2 -d -r1.33 -r1.34 *** ifnet.c 26 Mar 2007 15:33:44 -0000 1.33 --- ifnet.c 29 Mar 2007 16:34:39 -0000 1.34 *************** *** 120,124 **** void RemoveInterface(struct olsr_if *IntConf); ! #define MAX_INTERFACES 25 int __stdcall SignalHandler(unsigned long Signal); --- 120,124 ---- void RemoveInterface(struct olsr_if *IntConf); ! #define MAX_INTERFACES 100 int __stdcall SignalHandler(unsigned long Signal);