Author: adrian.chadd
Date: Sun Feb 22 12:16:08 2009
New Revision: 13817
Added:
playpen/LUSCA_HEAD_bgp/app/bgptest/
playpen/LUSCA_HEAD_bgp/app/bgptest/Makefile.am
playpen/LUSCA_HEAD_bgp/app/bgptest/bgptest.c
Modified:
playpen/LUSCA_HEAD_bgp/app/Makefile.am
playpen/LUSCA_HEAD_bgp/configure.in
Log:
Flesh out a (very empty looking) BGP test program, to further develop this
code
into something useful.
Modified: playpen/LUSCA_HEAD_bgp/app/Makefile.am
==============================================================================
--- playpen/LUSCA_HEAD_bgp/app/Makefile.am (original)
+++ playpen/LUSCA_HEAD_bgp/app/Makefile.am Sun Feb 22 12:16:08 2009
@@ -3,6 +3,6 @@
# $Id: Makefile.am 12826 2008-06-08 13:51:32Z adrian.chadd $
#
-DIST_SUBDIRS = tcptest
-SUBDIRS = tcptest
+DIST_SUBDIRS = tcptest bgptest
+SUBDIRS = tcptest bgptest
Added: playpen/LUSCA_HEAD_bgp/app/bgptest/Makefile.am
==============================================================================
--- (empty file)
+++ playpen/LUSCA_HEAD_bgp/app/bgptest/Makefile.am Sun Feb 22 12:16:08 2009
@@ -0,0 +1,28 @@
+#
+# Makefile for the Squid Object Cache server
+#
+# $Id: Makefile.am 11393 2006-09-22 09:08:46Z hno $
+#
+# Uncomment and customize the following to suit your needs:
+#
+
+
+AUTOMAKE_OPTIONS = subdir-objects
+
+INCLUDES = -I. -I$(top_builddir)
+
+TESTS=$(check_PROGRAMS)
+check_PROGRAMS=
+
+SUBDIRS =
+
+noinst_PROGRAMS = bgptest
+
+bgptest_SOURCES = bgptest.c
+
+LDADD = -L../../lib -L../../libsqdebug -L../../libcore -L../../libmem
-L../../libcb -L../../libiapp -L../../libsqinet -L../../libhttp
-L../../libstat -L../../libsqbgp -liapp -lmem -lcb -lsqdebug -lcore -lstat
-lsqbgp -lm -lsqinet -lmiscutil @SSLLIB@
+
+$(OBJS): $(top_srcdir)/include/version.h ../include/autoconf.h
+
+DISTCLEANFILES =
+
Added: playpen/LUSCA_HEAD_bgp/app/bgptest/bgptest.c
==============================================================================
--- (empty file)
+++ playpen/LUSCA_HEAD_bgp/app/bgptest/bgptest.c Sun Feb 22 12:16:08 2009
@@ -0,0 +1,80 @@
+#include "include/config.h"
+
+#include <stdio.h>
+#include <stdlib.h>
+#include <unistd.h>
+#include <string.h>
+#include <math.h>
+#include <fcntl.h>
+#include <signal.h>
+#include <sys/errno.h>
+#include <sys/socket.h>
+#include <netinet/in.h>
+#include <arpa/inet.h>
+
+#include "include/Array.h"
+#include "include/Stack.h"
+#include "include/util.h"
+#include "libcore/valgrind.h"
+#include "libcore/varargs.h"
+#include "libcore/debug.h"
+#include "libcore/kb.h"
+#include "libcore/gb.h"
+#include "libcore/tools.h"
+
+#include "libmem/MemPool.h"
+#include "libmem/MemBufs.h"
+#include "libmem/MemBuf.h"
+
+#include "libcb/cbdata.h"
+
+#include "libsqinet/inet_legacy.h"
+#include "libsqinet/sqinet.h"
+
+#include "libiapp/iapp_ssl.h"
+#include "libiapp/fd_types.h"
+#include "libiapp/comm_types.h"
+#include "libiapp/comm.h"
+#include "libiapp/pconn_hist.h"
+#include "libiapp/signals.h"
+#include "libiapp/mainloop.h"
+
+#include "libsqbgp/bgp_core.h"
+#include "libsqbgp/bgp_packet.h"
+#include "libsqbgp/bgp_rib.h"
+
+sqaddr_t dest;
+
+int
+main(int argc, const char *argv[])
+{
+ int fd;
+ const char *host;
+ short port;
+ u_short as_num;
+ u_short hold_time;
+
+ if (argc < 4) {
+ printf("Usage: %s <host> <port> <asnum> <hold-time>\n",
argv[0]);
+ exit(1);
+ }
+
+ iapp_init();
+ squid_signal(SIGPIPE, SIG_IGN, SA_RESTART);
+
+ _db_init("ALL,1");
+ _db_set_stderr_debug(1);
+
+ /* Create BGP FSM */
+
+ /* Setup outgoing socket */
+
+ /* Kick off BGP FSM with given FD */
+
+ while (1) {
+ iapp_runonce(60000);
+ }
+
+ exit(0);
+}
+
Modified: playpen/LUSCA_HEAD_bgp/configure.in
==============================================================================
--- playpen/LUSCA_HEAD_bgp/configure.in (original)
+++ playpen/LUSCA_HEAD_bgp/configure.in Sun Feb 22 12:16:08 2009
@@ -3318,6 +3318,7 @@
Makefile \
app/Makefile \
app/tcptest/Makefile \
+ app/bgptest/Makefile \
libsqbgp/Makefile \
libmime/Makefile \
libsqdns/Makefile \
--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups
"lusca-commit" group.
To post to this group, send email to [email protected]
To unsubscribe from this group, send email to
[email protected]
For more options, visit this group at
http://groups.google.com/group/lusca-commit?hl=en
-~----------~----~----~----~------~----~------~--~---