osmo-pcap: Create a dummy client.

This commit is contained in:
Holger Hans Peter Freyther 2011-05-31 11:16:40 +02:00
parent fbea3906af
commit 430366a2c5
6 changed files with 55 additions and 0 deletions

View File

@ -1,5 +1,7 @@
AUTOMAKE_OPTIONS = foreign dist-bzip2 1.6
SUBDIRS = include src
BUILT_SOURCES = $(top_srcdir)/.version
EXTRA_DIST = git-version-gen
$(top_srcdir)/.version:

View File

@ -23,7 +23,18 @@ AC_HEADER_STDC
dnl Checks for typedefs, structures and compiler characteristics
AC_ARG_WITH([pcap-config],
AC_HELP_STRING([--with-pcap-config=FILE], [Use given pcap-config]),
[pcapcfg="$withval" ],
[AC_PATH_PROG([pcapcfg], [pcap-config], [])])
if test x$pcapcfg = "x"; then
AC_MSG_ERROR([pcap-config can not be found])
fi
PCAP_LIBS=`$pcapcfg --libs`
PCAP_CFLAGS=`$pcapcfg --cflags`
AC_SUBST([PCAP_LIBS])
AC_SUBST([PCAP_CFLAGS])
# Coverage build taken from WebKit's configure.in
AC_MSG_CHECKING([whether to enable code coverage support])
@ -42,4 +53,7 @@ fi
dnl Generate the output
AC_OUTPUT(
include/Makefile
include/osmo-pcap/Makefile
src/Makefile
Makefile)

1
include/Makefile.am Normal file
View File

@ -0,0 +1 @@
SUBDIRS = osmo-pcap

View File

@ -0,0 +1 @@
noinst_HEADERS =

8
src/Makefile.am Normal file
View File

@ -0,0 +1,8 @@
INCLUDES = $(all_includes) -I$(top_srcdir)/include
AM_CFLAGS = -Wall $(LIBOSMOCORE_CFLAGS) $(LIBOSMOVTY_CFLAGS) $(PCAP_CFLAGS)
AM_LDFLAGS = $(LIBOSMOCORE_LIBS) $(LIBOSMOVTY_LIBS)
bin_PROGRAMS = osmo_pcap_client
osmo_pcap_client_SOURCES = osmo_client_main.c
osmo_pcap_client_LDADD = $(PCAP_LIBS)

29
src/osmo_client_main.c Normal file
View File

@ -0,0 +1,29 @@
/*
* osmo-pcap-client code
*
* (C) 2011 by Holger Hans Peter Freyther <zecke@selfish.org>
* (C) 2011 by On-Waves
* All Rights Reserved
*
* This program is free software; you can redistribute it and/or modify
* it under the terms of the GNU Affero General Public License as published by
* the Free Software Foundation; either version 3 of the License, or
* (at your option) any later version.
*
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU Affero General Public License for more details.
*
* You should have received a copy of the GNU Affero General Public License
* along with this program. If not, see <http://www.gnu.org/licenses/>.
*
*/
#include <pcap.h>
#include <stdio.h>
int main(int argc, char **argv)
{
return(0);
}