Skip to content
This repository

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Browse code

From Gilbert Hoyek <gil_hoyek@hotmail.com>: support for capturing SS7

traffic on Intel Septel cards, and for filtering on SS7 MTP3 fields.

Clean up indentation.
  • Loading branch information...
commit a0a4852137bc56c7b0062aa304d8aa55e6c54efd 1 parent b1a06c1
yuguy yuguy authored
1  CREDITS
@@ -33,6 +33,7 @@ Additional people who have contributed patches:
33 33 Erik de Castro Lopo <erik.de.castro.lopo@sensorynetworks.com>
34 34 Franz Schaefer <schaefer@mond.at>
35 35 Gianluca Varenni <varenni@netgroup-serv.polito.it>
  36 + Gilbert Hoyek <gil_hoyek@hotmail.com>
36 37 Gisle Vanem <giva@bgnett.no>
37 38 Graeme Hewson <ghewson@cix.compulink.co.uk>
38 39 Greg Stark <gsstark@mit.edu>
3  FILES
@@ -12,6 +12,7 @@ README.dag
12 12 README.hpux
13 13 README.linux
14 14 README.macosx
  15 +README.septel
15 16 README.tru64
16 17 README.Win32
17 18 SUNOS4/nit_if.o.sparc
@@ -87,6 +88,8 @@ pcap-nit.h
87 88 pcap-null.c
88 89 pcap-pf.c
89 90 pcap-pf.h
  91 +pcap-septel.c
  92 +pcap-septel.h
90 93 pcap-stdinc.h
91 94 pcap-snit.c
92 95 pcap-snoop.c
5 INSTALL.txt
... ... @@ -1,4 +1,4 @@
1   -@(#) $Header: /tcpdump/master/libpcap/INSTALL.txt,v 1.12 2004-12-18 08:52:08 guy Exp $ (LBL)
  1 +@(#) $Header: /tcpdump/master/libpcap/INSTALL.txt,v 1.13 2005-06-20 21:27:08 guy Exp $ (LBL)
2 2
3 3 To build libpcap, run "./configure" (a shell script). The configure
4 4 script will determine your system attributes and generate an
@@ -308,6 +308,7 @@ README.dag - notes on using libpcap to capture on Endace DAG devices
308 308 README.hpux - notes on using libpcap on HP-UX
309 309 README.linux - notes on using libpcap on Linux
310 310 README.macosx - notes on using libpcap on Mac OS X
  311 +README.septel - notes on using libpcap to capture on Intel/Septel devices
311 312 README.tru64 - notes on using libpcap on Digital/Tru64 UNIX
312 313 README.Win32 - notes on using libpcap on Win32 systems (with WinPcap)
313 314 SUNOS4 - pre-SunOS 4.1 replacement kernel nit modules
@@ -363,6 +364,8 @@ pcap-nit.h - SunOS Network Interface Tap definitions
363 364 pcap-null.c - dummy monitor support (allows offline use of libpcap)
364 365 pcap-pf.c - Ultrix and Digital/Tru64 UNIX Packet Filter support
365 366 pcap-pf.h - Ultrix and Digital/Tru64 UNIX Packet Filter definitions
  367 +pcap-septel.c - INTEL/Septel device capture support
  368 +pcap-septel.h - INTEL/Septel device capture support
366 369 pcap-stdinc.h - includes and #defines for compiling on Win32 systems
367 370 pcap-snit.c - SunOS 4.x STREAMS-based Network Interface Tap support
368 371 pcap-snoop.c - IRIX Snoop network monitoring support
50 README.septel
... ... @@ -0,0 +1,50 @@
  1 +The following instructions apply if you have a Linux platform and want
  2 +libpcap to support the Septel range of passive network monitoring cards
  3 +from Intel (http://www.intel.com)
  4 +
  5 +1) Install and build the Septel software distribution by following the
  6 +instructions supplied with that package.
  7 +
  8 +2) Configure libcap. To allow the 'configure' script to locate the Septel
  9 +software distribution use the '--with-septel' option:
  10 +
  11 + ./configure --with-septel=DIR
  12 +
  13 +where DIR is the root of the Septel software distribution, for example
  14 +/var/src/septel.
  15 +
  16 +By default (if you write only ./configure --with-septel) it takes
  17 +./../septel as argument for DIR.
  18 +
  19 +If the Septel software is correctly detected 'configure' will
  20 +report:
  21 +
  22 + checking whether we have Septel API... yes
  23 +
  24 +If 'configure' reports that there is no Septel API, the directory may have been
  25 +incorrectly specified or the Septel software was not built before configuring
  26 +libpcap.
  27 +
  28 +See also the libpcap INSTALL.txt file for further libpcap configuration
  29 +options.
  30 +
  31 +Building libpcap at this stage will include support for both the native
  32 +packet capture stream and for capturing from Septel cards. To build
  33 +libpcap with only Septel support specify the capture type as 'septel'
  34 +when configuring libpcap:
  35 +
  36 + ./configure --with-septel=DIR --with-pcap=septel
  37 +
  38 +Applications built with libpcap configured in this way will only detect Septel
  39 +cards and will not capture from the native OS packet stream.
  40 +
  41 +Note: As mentioned in pcap-septel.c we should first edit the system.txt
  42 +file to change the user part example (UPE) module id to 0xdd instead of
  43 +0x2d for technical reason. So this change in system.txt is crutial and
  44 +things will go wrong if it's not done. System.txt along with config.txt
  45 +are configuration files that are edited by the user before running the
  46 +gctload program that uses these files for initialising modules and
  47 +configuring parameters.
  48 +
  49 +----------------------------------------------------------------------
  50 +for more information please contact me : gil_hoyek@hotmail.com
3  config.h.in
@@ -53,6 +53,9 @@
53 53 /* define if you have a /proc/net/dev */
54 54 #undef HAVE_PROC_NET_DEV
55 55
  56 +/* define if you have a Septel API */
  57 +#undef HAVE_SEPTEL_API
  58 +
56 59 /* Define to 1 if you have the `snprintf' function. */
57 60 #undef HAVE_SNPRINTF
58 61
1,615 configure
1,117 additions, 498 deletions not shown
184 configure.in
... ... @@ -1,4 +1,4 @@
1   -dnl @(#) $Header: /tcpdump/master/libpcap/configure.in,v 1.124 2005-04-23 22:43:15 guy Exp $ (LBL)
  1 +dnl @(#) $Header: /tcpdump/master/libpcap/configure.in,v 1.125 2005-06-20 21:27:08 guy Exp $ (LBL)
2 2 dnl
3 3 dnl Copyright (c) 1994, 1995, 1996, 1997
4 4 dnl The Regents of the University of California. All rights reserved.
@@ -6,7 +6,7 @@ dnl
6 6 dnl Process this file with autoconf to produce a configure script.
7 7 dnl
8 8
9   -AC_REVISION($Revision: 1.124 $)
  9 +AC_REVISION($Revision: 1.125 $)
10 10 AC_PREREQ(2.50)
11 11 AC_INIT(pcap.c)
12 12
@@ -366,7 +366,11 @@ linux)
366 366
367 367 dag)
368 368 V_DEFS="$V_DEFS -DDAG_ONLY"
369   - ;;
  369 + ;;
  370 +
  371 +septel)
  372 + V_DEFS="$V_DEFS -DSEPTEL_ONLY"
  373 + ;;
370 374
371 375 null)
372 376 AC_MSG_WARN(cannot determine packet capture interface)
@@ -426,8 +430,8 @@ AC_ARG_WITH([dag-libraries], [ --with-dag-libraries=DIR Endace DAG library dir
426 430 case "$V_PCAP" in
427 431 linux|bpf|dag)
428 432 #
429   - # We support the DAG API on Linux or BSD, or if we're building a
430   - # DAG-only libpcap.
  433 + # We support the DAG API if we're on Linux or BSD, or if we're
  434 + # building a DAG-only libpcap.
431 435 #
432 436 ;;
433 437 *)
@@ -450,7 +454,7 @@ if test "$want_dag" != no; then
450 454
451 455 AC_MSG_CHECKING([whether we have DAG API headers])
452 456
453   - # If necessary, set default paths for DAG API headers and libraries.
  457 + # If necessary, set default paths for DAG API headers and libraries.
454 458 if test -z "$dag_root"; then
455 459 dag_root=/usr/local
456 460 fi
@@ -470,7 +474,7 @@ if test "$want_dag" != no; then
470 474 if test -r $dag_include_dir/dagapi.h; then
471 475 ac_cv_lbl_dag_api=yes
472 476 fi
473   - AC_MSG_RESULT([$ac_cv_lbl_dag_api ($dag_include_dir)])
  477 + AC_MSG_RESULT([$ac_cv_lbl_dag_api ($dag_include_dir)])
474 478 fi
475 479
476 480 if test $ac_cv_lbl_dag_api = yes; then
@@ -478,30 +482,25 @@ if test $ac_cv_lbl_dag_api = yes; then
478 482 AC_MSG_CHECKING([dagapi.o])
479 483 dagapi_obj=no
480 484 if test -r $dag_tools_dir/dagapi.o; then
481   -
482   - # 2.4.x.
  485 + # 2.4.x.
483 486 dagapi_obj=$dag_tools_dir/dagapi.o
484   -
485 487 elif test -r $dag_lib_dir/dagapi.o; then
486   -
487   - # 2.5.x.
488   - dagapi_obj=$dag_lib_dir/dagapi.o
489   -
490   - elif test -r $dag_lib_dir/libdag.a; then
491   -
492   - # 2.5.x.
  488 + # 2.5.x.
  489 + dagapi_obj=$dag_lib_dir/dagapi.o
  490 + elif test -r $dag_lib_dir/libdag.a; then
  491 + # 2.5.x.
493 492 ar x $dag_lib_dir/libdag.a dagapi.o
494 493 if test -r ./dagapi.o; then
495 494 dagapi_obj=./dagapi.o
496 495 fi
497   - fi
  496 + fi
498 497
499 498 if test $dagapi_obj = no; then
500   - AC_MSG_RESULT([no (checked $dag_lib_dir $dag_tools_dir $dag_lib_dir/libdag.a)])
  499 + AC_MSG_RESULT([no (checked $dag_lib_dir $dag_tools_dir $dag_lib_dir/libdag.a)])
501 500 ac_cv_lbl_dag_api=no
502 501 else
503 502 AC_MSG_RESULT([yes ($dagapi_obj)])
504   - fi
  503 + fi
505 504 fi
506 505
507 506 if test $ac_cv_lbl_dag_api = yes; then
@@ -509,26 +508,21 @@ if test $ac_cv_lbl_dag_api = yes; then
509 508 AC_MSG_CHECKING([dagopts.o])
510 509 dagopts_obj=no
511 510 if test -r $dag_tools_dir/dagopts.o; then
512   -
513   - # 2.4.x.
  511 + # 2.4.x.
514 512 dagopts_obj=$dag_tools_dir/dagopts.o
515   -
516 513 elif test -r $dag_lib_dir/dagopts.o; then
517   -
518   - # 2.5.x.
519   - dagopts_obj=$dag_lib_dir/dagopts.o
520   -
521   - elif test -r $dag_lib_dir/libdag.a; then
522   -
523   - # 2.5.x.
  514 + # 2.5.x.
  515 + dagopts_obj=$dag_lib_dir/dagopts.o
  516 + elif test -r $dag_lib_dir/libdag.a; then
  517 + # 2.5.x.
524 518 ar x $dag_lib_dir/libdag.a dagopts.o
525 519 if test -r ./dagopts.o; then
526 520 dagopts_obj=./dagopts.o
527   - fi
  521 + fi
528 522 fi
529 523
530 524 if test $dagopts_obj = no; then
531   - AC_MSG_RESULT([no (checked $dag_lib_dir $dag_tools_dir $dag_lib_dir/libdag.a)])
  525 + AC_MSG_RESULT([no (checked $dag_lib_dir $dag_tools_dir $dag_lib_dir/libdag.a)])
532 526 ac_cv_lbl_dag_api=no
533 527 else
534 528 AC_MSG_RESULT([yes ($dagopts_obj)])
@@ -536,37 +530,31 @@ if test $ac_cv_lbl_dag_api = yes; then
536 530 fi
537 531
538 532 if test $ac_cv_lbl_dag_api = yes; then
539   -
540 533 # Under 2.5.x only we need to add dagreg.o.
541 534 if test -r $dag_include_dir/dagreg.h; then
542   -
543   - AC_MSG_CHECKING([dagreg.o])
544   - dagreg_obj=no
545   - if test -r $dag_lib_dir/dagreg.o; then
546   -
547   - # Object file is ready and waiting.
548   - dagreg_obj=$dag_lib_dir/dagreg.o
549   -
550   - elif test -r $dag_lib_dir/libdag.a; then
551   -
552   - # Extract from libdag.a.
  535 + AC_MSG_CHECKING([dagreg.o])
  536 + dagreg_obj=no
  537 + if test -r $dag_lib_dir/dagreg.o; then
  538 + # Object file is ready and waiting.
  539 + dagreg_obj=$dag_lib_dir/dagreg.o
  540 + elif test -r $dag_lib_dir/libdag.a; then
  541 + # Extract from libdag.a.
553 542 ar x $dag_lib_dir/libdag.a dagreg.o
554 543 if test -r ./dagreg.o; then
555   - dagreg_obj=./dagreg.o
556   - fi
  544 + dagreg_obj=./dagreg.o
  545 + fi
557 546 fi
558 547
559 548 if test $dagreg_obj = no; then
560   - AC_MSG_RESULT([no (checked $dag_lib_dir $dag_lib_dir/libdag.a)])
  549 + AC_MSG_RESULT([no (checked $dag_lib_dir $dag_lib_dir/libdag.a)])
561 550 ac_cv_lbl_dag_api=no
562   - else
  551 + else
563 552 AC_MSG_RESULT([yes ($dagreg_obj)])
564 553 fi
565 554 fi
566 555 fi
567 556
568 557 if test $ac_cv_lbl_dag_api = yes; then
569   -
570 558 V_INCLS="$V_INCLS -I$dag_include_dir"
571 559 V_LIBS="$V_LIBS $dagapi_obj $dagopts_obj $dagreg_obj"
572 560 if test $V_PCAP != dag ; then
@@ -574,7 +562,8 @@ if test $ac_cv_lbl_dag_api = yes; then
574 562 fi
575 563
576 564 # See if we can find a general version string.
577   - # Don't need to save and restore LIBS to prevent -ldag being included if there's a found-action (arg 3).
  565 + # Don't need to save and restore LIBS to prevent -ldag being
  566 + # included if there's a found-action (arg 3).
578 567 saved_ldflags=$LDFLAGS
579 568 LDFLAGS="-L$dag_lib_dir"
580 569 AC_CHECK_LIB([dag], [dag_attach_stream], [dag_version="2.5.x"], [dag_version="2.4.x"])
@@ -585,20 +574,103 @@ if test $ac_cv_lbl_dag_api = yes; then
585 574 if test -r "$dag_root/VERSION"; then
586 575 dag_version="`cat $dag_root/VERSION`"
587 576 fi
588   - AC_MSG_RESULT([$dag_version])
  577 + AC_MSG_RESULT([$dag_version])
589 578 AC_DEFINE(HAVE_DAG_API, 1, [define if you have the DAG API])
590 579 fi
591 580
592 581 if test $ac_cv_lbl_dag_api = no; then
593 582 if test "$want_dag" = yes; then
594   - # User wanted DAG support but we couldn't find it.
  583 + # User wanted DAG support but we couldn't find it.
595 584 AC_MSG_ERROR([DAG API requested, but not found at $dag_root: use --without-dag])
596 585 fi
597 586
598   - if test "$V_PCAP" = dag; then
599   - # User requested "dag" capture type but the DAG API wasn't found.
600   - AC_MSG_ERROR([Specifying the capture type as "dag" requires the DAG API to be present; use the --with-dag options to specify the location. (Try "./configure --help" for more information.)])
601   - fi
  587 + if test "$V_PCAP" = dag; then
  588 + # User requested "dag" capture type but the DAG API wasn't
  589 + # found.
  590 + AC_MSG_ERROR([Specifying the capture type as "dag" requires the DAG API to be present; use the --with-dag options to specify the location. (Try "./configure --help" for more information.)])
  591 + fi
  592 +fi
  593 +
  594 +AC_ARG_WITH(septel, [ --with-septel[=DIR] include Septel support (located in directory DIR, if supplied). [default=yes, on Linux, if present]],
  595 +[
  596 + if test "$withval" = no
  597 + then
  598 + want_septel=no
  599 + elif test "$withval" = yes
  600 + then
  601 + want_septel=yes
  602 + septel_root=
  603 + else
  604 + want_septel=yes
  605 + septel_root=$withval
  606 + fi
  607 +],[
  608 + #
  609 + # Use Septel API if present, otherwise don't
  610 + #
  611 + want_septel=ifpresent
  612 + septel_root=./../septel
  613 +])
  614 +ac_cv_lbl_septel_api=no
  615 +case "$V_PCAP" in
  616 +linux|septel)
  617 + #
  618 + # We support the Septel API if we're on Linux, or if we're building
  619 + # a Septel-only libpcap.
  620 + #
  621 + ;;
  622 +*)
  623 + #
  624 + # If the user explicitly requested Septel, tell them it's not
  625 + # supported.
  626 + #
  627 + # If they expressed no preference, don't include it.
  628 + #
  629 + if test $want_septel = yes; then
  630 + AC_MSG_ERROR(Septel support only available with 'linux' and 'septel' packet capture types)
  631 + elif test $want_septel = yes; then
  632 + want_septel=no
  633 + fi
  634 + ;;
  635 +esac
  636 +
  637 +if test "$with_septel" != no; then
  638 + AC_MSG_CHECKING(whether we have Septel API)
  639 +
  640 + if test -z "$septel_root"; then
  641 + septel_root=$srcdir/../septel
  642 +
  643 + fi
  644 +
  645 + septel_tools_dir="$septel_root"
  646 + septel_include_dir="$septel_root/INC"
  647 + DEF="-DHAVE_SEPTEL_API"
  648 +
  649 + ac_cv_lbl_septel_api=no
  650 + if test -r "$septel_include_dir/msg.h"; then
  651 + V_INCLS="$V_INCLS -I$septel_include_dir"
  652 + V_DEFS="$V_DEFS $DEF"
  653 + V_LIBS="$V_LIBS $septel_tools_dir/asciibin.o $septel_tools_dir/bit2byte.o $septel_tools_dir/confirm.o $septel_tools_dir/fmtmsg.o $septel_tools_dir/gct_unix.o $septel_tools_dir/hqueue.o $septel_tools_dir/ident.o $septel_tools_dir/mem.o $septel_tools_dir/pack.o $septel_tools_dir/parse.o $septel_tools_dir/pool.o $septel_tools_dir/sdlsig.o $septel_tools_dir/strtonum.o $septel_tools_dir/timer.o $septel_tools_dir/trace.o "
  654 +
  655 + if test "$V_PCAP" != septel ; then
  656 + SSRC="pcap-septel.c"
  657 +
  658 + fi
  659 + ac_cv_lbl_septel_api=yes
  660 + fi
  661 +
  662 + AC_MSG_RESULT($ac_cv_lbl_septel_api)
  663 + if test $ac_cv_lbl_septel_api = no; then
  664 + if test "$want_septel" = yes; then
  665 + AC_MSG_ERROR(Septel API not found under directory $septel_root; use --without-septel)
  666 + fi
  667 + else
  668 + AC_DEFINE(HAVE_SEPTEL_API, 1, [define if you have a Septel API])
  669 + fi
  670 +fi
  671 +
  672 +if test "$V_PCAP" = septel -a "$ac_cv_lbl_septel_api" = no; then
  673 + AC_MSG_ERROR(Specifying the capture type as 'septel' requires the Septel API to be present; use --with-septel=DIR)
602 674 fi
603 675
604 676
169 gencode.c
@@ -21,7 +21,7 @@
21 21 */
22 22 #ifndef lint
23 23 static const char rcsid[] _U_ =
24   - "@(#) $Header: /tcpdump/master/libpcap/gencode.c,v 1.248 2005-06-06 14:10:58 hannes Exp $ (LBL)";
  24 + "@(#) $Header: /tcpdump/master/libpcap/gencode.c,v 1.249 2005-06-20 21:27:08 guy Exp $ (LBL)";
25 25 #endif
26 26
27 27 #ifdef HAVE_CONFIG_H
@@ -718,6 +718,14 @@ static u_int off_vci;
718 718 static u_int off_proto;
719 719
720 720 /*
  721 + * These are offsets for the MTP3 fields.
  722 + */
  723 +static u_int off_sio;
  724 +static u_int off_opc;
  725 +static u_int off_dpc;
  726 +static u_int off_sls;
  727 +
  728 +/*
721 729 * This is the offset of the first byte after the ATM pseudo_header,
722 730 * or -1 if there is no ATM pseudo-header.
723 731 */
@@ -770,6 +778,11 @@ init_linktype(p)
770 778 off_proto = -1;
771 779 off_payload = -1;
772 780
  781 + off_sio = -1;
  782 + off_opc = -1;
  783 + off_dpc = -1;
  784 + off_sls = -1;
  785 +
773 786 /*
774 787 * Also assume it's not 802.11 with a fixed-length radio header.
775 788 */
@@ -1119,43 +1132,53 @@ init_linktype(p)
1119 1132 off_nl_nosnap = 18;
1120 1133 return;
1121 1134
1122   - /* frames captured on a Juniper PPPoE service PIC
1123   - * contain raw ethernet frames */
1124   - case DLT_JUNIPER_PPPOE:
1125   - off_linktype = 16;
1126   - off_nl = 18; /* Ethernet II */
1127   - off_nl_nosnap = 21; /* 802.3+802.2 */
1128   - return;
  1135 + /* frames captured on a Juniper PPPoE service PIC
  1136 + * contain raw ethernet frames */
  1137 + case DLT_JUNIPER_PPPOE:
  1138 + off_linktype = 16;
  1139 + off_nl = 18; /* Ethernet II */
  1140 + off_nl_nosnap = 21; /* 802.3+802.2 */
  1141 + return;
1129 1142
1130   - case DLT_JUNIPER_PPPOE_ATM:
1131   - off_linktype = 4;
1132   - off_nl = 6;
1133   - off_nl_nosnap = -1; /* no 802.2 LLC */
1134   - return;
  1143 + case DLT_JUNIPER_PPPOE_ATM:
  1144 + off_linktype = 4;
  1145 + off_nl = 6;
  1146 + off_nl_nosnap = -1; /* no 802.2 LLC */
  1147 + return;
1135 1148
1136   - case DLT_JUNIPER_GGSN:
1137   - off_linktype = 6;
1138   - off_nl = 12;
1139   - off_nl_nosnap = -1; /* no 802.2 LLC */
1140   - return;
  1149 + case DLT_JUNIPER_GGSN:
  1150 + off_linktype = 6;
  1151 + off_nl = 12;
  1152 + off_nl_nosnap = -1; /* no 802.2 LLC */
  1153 + return;
1141 1154
1142   - case DLT_JUNIPER_ES:
1143   - off_linktype = 6;
1144   - off_nl = -1; /* not really a network layer but raw IP adresses */
1145   - off_nl_nosnap = -1; /* no 802.2 LLC */
1146   - return;
  1155 + case DLT_JUNIPER_ES:
  1156 + off_linktype = 6;
  1157 + off_nl = -1; /* not really a network layer but raw IP adresses */
  1158 + off_nl_nosnap = -1; /* no 802.2 LLC */
  1159 + return;
1147 1160
1148   - case DLT_JUNIPER_MONITOR:
1149   - off_linktype = 12;
1150   - off_nl = 12; /* raw IP/IP6 header */
1151   - off_nl_nosnap = -1; /* no 802.2 LLC */
1152   - return;
  1161 + case DLT_JUNIPER_MONITOR:
  1162 + off_linktype = 12;
  1163 + off_nl = 12; /* raw IP/IP6 header */
  1164 + off_nl_nosnap = -1; /* no 802.2 LLC */
  1165 + return;
1153 1166
1154   - case DLT_JUNIPER_SERVICES:
1155   - off_linktype = 12;
1156   - off_nl = -1; /* L3 proto location dep. on cookie type */
1157   - off_nl_nosnap = -1; /* no 802.2 LLC */
1158   - return;
  1167 + case DLT_JUNIPER_SERVICES:
  1168 + off_linktype = 12;
  1169 + off_nl = -1; /* L3 proto location dep. on cookie type */
  1170 + off_nl_nosnap = -1; /* no 802.2 LLC */
  1171 + return;
  1172 +
  1173 + case DLT_MTP2:
  1174 + off_sio = 3;
  1175 + off_opc = 4;
  1176 + off_dpc = 4;
  1177 + off_sls = 7;
  1178 + off_linktype = -1;
  1179 + off_nl = -1;
  1180 + off_nl_nosnap = -1;
  1181 + return;
1159 1182
1160 1183 #ifdef DLT_PFSYNC
1161 1184 case DLT_PFSYNC:
@@ -6442,6 +6465,86 @@ gen_atmtype_abbrev(type)
6442 6465 return b1;
6443 6466 }
6444 6467
  6468 +struct block *
  6469 +gen_mtp3field_code(mtp3field, jvalue, jtype, reverse)
  6470 + int mtp3field;
  6471 + bpf_u_int32 jvalue;
  6472 + bpf_u_int32 jtype;
  6473 + int reverse;
  6474 +{
  6475 + struct block *b0;
  6476 + bpf_u_int32 val1 , val2 , val3;
  6477 +
  6478 + switch (mtp3field) {
  6479 +
  6480 + case M_SIO:
  6481 + if (off_sio == (u_int)-1)
  6482 + abort();
  6483 + /* sio coded on 1 byte so max value 255 */
  6484 + if(jvalue > 255)
  6485 + bpf_error("sio value %u too big; max value = 255",
  6486 + jvalue);
  6487 + b0 = gen_ncmp(OR_PACKET, off_sio, BPF_B, 0xffffffff,
  6488 + (u_int)jtype, reverse, (u_int)jvalue);
  6489 + break;
  6490 +
  6491 + case M_OPC:
  6492 + if (off_opc == (u_int)-1)
  6493 + abort();
  6494 + /* opc coded on 14 bits so max value 16383 */
  6495 + if (jvalue > 16383)
  6496 + bpf_error("opc value %u too big; max value = 16383",
  6497 + jvalue);
  6498 + /* the following instructions are made to convert jvalue
  6499 + * to the form used to write opc in an ss7 message*/
  6500 + val1 = jvalue & 0x00003c00;
  6501 + val1 = val1 >>10;
  6502 + val2 = jvalue & 0x000003fc;
  6503 + val2 = val2 <<6;
  6504 + val3 = jvalue & 0x00000003;
  6505 + val3 = val3 <<22;
  6506 + jvalue = val1 + val2 + val3;
  6507 + b0 = gen_ncmp(OR_PACKET, off_opc, BPF_W, 0x00c0ff0f,
  6508 + (u_int)jtype, reverse, (u_int)jvalue);
  6509 + break;
  6510 +
  6511 + case M_DPC:
  6512 + if (off_dpc == (u_int)-1)
  6513 + abort();
  6514 + /* dpc coded on 14 bits so max value 16383 */
  6515 + if (jvalue > 16383)
  6516 + bpf_error("dpc value %u too big; max value = 16383",
  6517 + jvalue);
  6518 + /* the following instructions are made to convert jvalue
  6519 + * to the forme used to write dpc in an ss7 message*/
  6520 + val1 = jvalue & 0x000000ff;
  6521 + val1 = val1 << 24;
  6522 + val2 = jvalue & 0x00003f00;
  6523 + val2 = val2 << 8;
  6524 + jvalue = val1 + val2;
  6525 + b0 = gen_ncmp(OR_PACKET, off_dpc, BPF_W, 0xff3f0000,
  6526 + (u_int)jtype, reverse, (u_int)jvalue);
  6527 + break;
  6528 +
  6529 + case M_SLS:
  6530 + if (off_sls == (u_int)-1)
  6531 + abort();
  6532 + /* sls coded on 4 bits so max value 15 */
  6533 + if (jvalue > 15)
  6534 + bpf_error("sls value %u too big; max value = 15",
  6535 + jvalue);
  6536 + /* the following instruction is made to convert jvalue
  6537 + * to the forme used to write sls in an ss7 message*/
  6538 + jvalue = jvalue << 4;
  6539 + b0 = gen_ncmp(OR_PACKET, off_sls, BPF_B, 0xf0,
  6540 + (u_int)jtype,reverse, (u_int)jvalue);
  6541 + break;
  6542 +
  6543 + default:
  6544 + abort();
  6545 + }
  6546 + return b0;
  6547 +}
6445 6548
6446 6549 static struct block *
6447 6550 gen_msg_abbrev(type)
11 gencode.h
@@ -18,7 +18,7 @@
18 18 * WARRANTIES, INCLUDING, WITHOUT LIMITATION, THE IMPLIED WARRANTIES OF
19 19 * MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE.
20 20 *
21   - * @(#) $Header: /tcpdump/master/libpcap/gencode.h,v 1.64 2005-05-02 21:13:08 guy Exp $ (LBL)
  21 + * @(#) $Header: /tcpdump/master/libpcap/gencode.h,v 1.65 2005-06-20 21:27:09 guy Exp $ (LBL)
22 22 */
23 23
24 24 /*
@@ -173,6 +173,13 @@
173 173 end-to-end circuits, ILMI circuits or
174 174 connection signalling circuit. */
175 175
  176 +/*MTP3 field types */
  177 +#define M_SIO 1
  178 +#define M_OPC 2
  179 +#define M_DPC 3
  180 +#define M_SLS 4
  181 +
  182 +
176 183 struct slist;
177 184
178 185 struct stmt {
@@ -286,6 +293,8 @@ struct block *gen_atmfield_code(int atmfield, bpf_int32 jvalue, bpf_u_int32 jtyp
286 293 struct block *gen_atmtype_abbrev(int type);
287 294 struct block *gen_atmmulti_abbrev(int type);
288 295
  296 +struct block *gen_mtp3field_code(int mtp3field, bpf_u_int32 jvalue, bpf_u_int32 jtype, int reverse);
  297 +
289 298 struct block *gen_pf_ifname(const char *);
290 299 struct block *gen_pf_rnr(int);
291 300 struct block *gen_pf_srnr(int);
31 grammar.y
@@ -22,7 +22,7 @@
22 22 */
23 23 #ifndef lint
24 24 static const char rcsid[] _U_ =
25   - "@(#) $Header: /tcpdump/master/libpcap/grammar.y,v 1.89 2005-05-02 21:13:09 guy Exp $ (LBL)";
  25 + "@(#) $Header: /tcpdump/master/libpcap/grammar.y,v 1.90 2005-06-20 21:27:09 guy Exp $ (LBL)";
26 26 #endif
27 27
28 28 #ifdef HAVE_CONFIG_H
@@ -97,6 +97,7 @@ pcap_parse()
97 97 struct {
98 98 struct qual q;
99 99 int atmfieldtype;
  100 + int mtp3fieldtype;
100 101 struct block *b;
101 102 } blk;
102 103 struct block *rblk;
@@ -112,6 +113,9 @@ pcap_parse()
112 113 %type <i> atmtype atmmultitype
113 114 %type <blk> atmfield
114 115 %type <blk> atmfieldvalue atmvalue atmlistvalue
  116 +%type <blk> mtp3field
  117 +%type <blk> mtp3fieldvalue mtp3value mtp3listvalue
  118 +
115 119
116 120 %token DST SRC HOST GATEWAY
117 121 %token NET NETMASK PORT PORTRANGE LESS GREATER PROTO PROTOCHAIN CBYTE
@@ -135,6 +139,7 @@ pcap_parse()
135 139 %token OAM OAMF4 CONNECTMSG METACONNECT
136 140 %token VPI VCI
137 141 %token RADIO
  142 +%token SIO OPC DPC SLS
138 143
139 144 %type <s> ID
140 145 %type <e> EID
@@ -255,6 +260,7 @@ rterm: head id { $$ = $2; }
255 260 | atmtype { $$.b = gen_atmtype_abbrev($1); $$.q = qerr; }
256 261 | atmmultitype { $$.b = gen_atmmulti_abbrev($1); $$.q = qerr; }
257 262 | atmfield atmvalue { $$.b = $2.b; $$.q = qerr; }
  263 + | mtp3field mtp3value { $$.b = $2.b; $$.q = qerr; }
258 264 ;
259 265 /* protocol level qualifiers */
260 266 pqual: pname
@@ -430,4 +436,27 @@ atmfieldvalue: NUM {
430 436 atmlistvalue: atmfieldvalue
431 437 | atmlistvalue or atmfieldvalue { gen_or($1.b, $3.b); $$ = $3; }
432 438 ;
  439 + /* MTP3 field types quantifier */
  440 +mtp3field: SIO { $$.mtp3fieldtype = M_SIO; }
  441 + | OPC { $$.mtp3fieldtype = M_OPC; }
  442 + | DPC { $$.mtp3fieldtype = M_DPC; }
  443 + | SLS { $$.mtp3fieldtype = M_SLS; }
  444 + ;
  445 +mtp3value: mtp3fieldvalue
  446 + | relop NUM { $$.b = gen_mtp3field_code($<blk>0.mtp3fieldtype, (u_int)$2, (u_int)$1, 0); }
  447 + | irelop NUM { $$.b = gen_mtp3field_code($<blk>0.mtp3fieldtype, (u_int)$2, (u_int)$1, 1); }
  448 + | paren mtp3listvalue ')' { $$.b = $2.b; $$.q = qerr; }
  449 + ;
  450 +mtp3fieldvalue: NUM {
  451 + $$.mtp3fieldtype = $<blk>0.mtp3fieldtype;
  452 + if ($$.mtp3fieldtype == M_SIO ||
  453 + $$.mtp3fieldtype == M_OPC ||
  454 + $$.mtp3fieldtype == M_DPC ||
  455 + $$.mtp3fieldtype == M_SLS )
  456 + $$.b = gen_mtp3field_code($$.mtp3fieldtype, (u_int) $1, BPF_JEQ, 0);
  457 + }
  458 + ;
  459 +mtp3listvalue: mtp3fieldvalue
  460 + | mtp3listvalue or mtp3fieldvalue { gen_or($1.b, $3.b); $$ = $3; }
  461 + ;
433 462 %%
5 inet.c
@@ -34,7 +34,7 @@
34 34
35 35 #ifndef lint
36 36 static const char rcsid[] _U_ =
37   - "@(#) $Header: /tcpdump/master/libpcap/inet.c,v 1.66 2005-02-10 19:38:06 guy Exp $ (LBL)";
  37 + "@(#) $Header: /tcpdump/master/libpcap/inet.c,v 1.67 2005-06-20 21:27:10 guy Exp $ (LBL)";
38 38 #endif
39 39
40 40 #ifdef HAVE_CONFIG_H
@@ -539,6 +539,9 @@ pcap_lookupnet(device, netp, maskp, errbuf)
539 539 #ifdef HAVE_DAG_API
540 540 || strstr(device, "dag") != NULL
541 541 #endif
  542 +#ifdef HAVE_SEPTEL_API
  543 + || strstr(device, "septel") != NULL
  544 +#endif
542 545 ) {
543 546 *netp = *maskp = 0;
544 547 return 0;
19 pcap-linux.c
@@ -27,7 +27,7 @@
27 27
28 28 #ifndef lint
29 29 static const char rcsid[] _U_ =
30   - "@(#) $Header: /tcpdump/master/libpcap/pcap-linux.c,v 1.111 2005-05-03 18:53:59 guy Exp $ (LBL)";
  30 + "@(#) $Header: /tcpdump/master/libpcap/pcap-linux.c,v 1.112 2005-06-20 21:27:10 guy Exp $ (LBL)";
31 31 #endif
32 32
33 33 /*
@@ -83,6 +83,10 @@ static const char rcsid[] _U_ =
83 83 #ifdef HAVE_DAG_API
84 84 #include "pcap-dag.h"
85 85 #endif /* HAVE_DAG_API */
  86 +
  87 +#ifdef HAVE_SEPTEL_API
  88 +#include "pcap-septel.h"
  89 +#endif /* HAVE_SEPTEL_API */
86 90
87 91 #include <errno.h>
88 92 #include <stdlib.h>
@@ -245,7 +249,13 @@ pcap_open_live(const char *device, int snaplen, int promisc, int to_ms,
245 249 }
246 250 #endif /* HAVE_DAG_API */
247 251
248   - /* Allocate a handle for this session. */
  252 +#ifdef HAVE_SEPTEL_API
  253 + if (strstr(device, "septel")) {
  254 + return septel_open_live(device, snaplen, promisc, to_ms, ebuf);
  255 + }
  256 +#endif /* HAVE_SEPTEL_API */
  257 +
  258 + /* Allocate a handle for this session. */
249 259
250 260 handle = malloc(sizeof(*handle));
251 261 if (handle == NULL) {
@@ -855,6 +865,11 @@ pcap_platform_finddevs(pcap_if_t **alldevsp, char *errbuf)
855 865 return (-1);
856 866 #endif /* HAVE_DAG_API */
857 867
  868 +#ifdef HAVE_SEPTEL_API
  869 + if (septel_platform_finddevs(alldevsp, errbuf) < 0)
  870 + return (-1);
  871 +#endif /* HAVE_SEPTEL_API */
  872 +
858 873 return (0);
859 874 }
860 875
318 pcap-septel.c
... ... @@ -0,0 +1,318 @@
  1 +/*
  2 + * pcap-septel.c: Packet capture interface for Intel/Septel card.
  3 + *
  4 + * The functionality of this code attempts to mimic that of pcap-linux as much
  5 + * as possible. This code is compiled in several different ways depending on
  6 + * whether SEPTEL_ONLY and HAVE_SEPTEL_API are defined. If HAVE_SEPTEL_API is
  7 + * not defined it should not get compiled in, otherwise if SEPTEL_ONLY is
  8 + * defined then the 'septel_' function calls are renamed to 'pcap_'
  9 + * equivalents. If SEPTEL_ONLY is not defined then nothing is altered - the
  10 + * septel_ functions will be called as required from their
  11 + * pcap-linux/equivalents.
  12 + *
  13 + * Authors: Gilbert HOYEK (gil_hoyek@hotmail.com), Elias M. KHOURY
  14 + * (+961 3 485243)
  15 + */
  16 +
  17 +#ifndef lint
  18 +static const char rcsid[] _U_ =
  19 + "@(#) $Header: /tcpdump/master/libpcap/pcap-septel.c,v 1.1 2005-06-20 21:27:10 guy Exp $";
  20 +#endif
  21 +
  22 +#ifdef HAVE_CONFIG_H
  23 +#include "config.h"
  24 +#endif
  25 +
  26 +#include <sys/param.h>
  27 +
  28 +#include <stdlib.h>
  29 +#include <string.h>
  30 +#include <errno.h>
  31 +
  32 +#include "pcap-int.h"
  33 +
  34 +#include <ctype.h>
  35 +#include <netinet/in.h>
  36 +#include <sys/mman.h>
  37 +#include <sys/socket.h>
  38 +#include <sys/types.h>
  39 +#include <unistd.h>
  40 +
  41 +#ifdef HAVE_SEPTEL_API
  42 +#include <msg.h>
  43 +#include <ss7_inc.h>
  44 +#include <sysgct.h>
  45 +#include <pack.h>
  46 +#include <system.h>
  47 +#endif /* HAVE_SEPTEL_API */
  48 +
  49 +#ifdef SEPTEL_ONLY
  50 +/* This code is required when compiling for a DAG device only. */
  51 +#include "pcap-septel.h"
  52 +
  53 +/* Replace dag function names with pcap equivalent. */
  54 +#define septel_open_live pcap_open_live
  55 +#define septel_platform_finddevs pcap_platform_finddevs
  56 +#endif /* SEPTEL_ONLY */
  57 +
  58 +static int septel_setfilter(pcap_t *p, struct bpf_program *fp);
  59 +static int septel_stats(pcap_t *p, struct pcap_stat *ps);
  60 +static int septel_set_datalink(pcap_t *p, int dlt);
  61 +static int septel_get_datalink(pcap_t *p);
  62 +static int septel_setnonblock(pcap_t *p, int nonblock, char *errbuf);
  63 +
  64 +static void septel_platform_close(pcap_t *p) {
  65 +
  66 +}
  67 +
  68 +
  69 +
  70 +/*
  71 + * Read at most max_packets from the capture queue and call the callback
  72 + * for each of them. Returns the number of packets handled, -1 if an
  73 + * error occured, or -2 if we were told to break out of the loop.
  74 + */
  75 +static int septel_read(pcap_t *p, int cnt, pcap_handler callback, u_char *user) {
  76 +
  77 + HDR *h;
  78 + MSG *m;
  79 + int processed = 0 ;
  80 + int t = 0 ;
  81 +
  82 + /* identifier for the message queue of the module(upe) from which we are capturing
  83 + * packets.These IDs are defined in system.txt . By default it is set to 0x2d
  84 + * so change it to 0xdd for technical reason and therefore the module id for upe becomes:
  85 + * LOCAL 0xdd * upe - Example user part task */
  86 + unsigned int id = 0xdd;
  87 +
  88 + /* process the packets */
  89 + do {
  90 +
  91 + unsigned short packet_len = 0;
  92 + int caplen = 0;
  93 + int counter = 0;
  94 + struct pcap_pkthdr pcap_header;
  95 +
  96 + u_char *dp ;
  97 + dp = malloc(320); /* 320 = size of param area */
  98 +
  99 + /*
  100 + * Has "pcap_breakloop()" been called?
  101 + */
  102 + loop:
  103 + if (p->break_loop) {
  104 + /*
  105 + * Yes - clear the flag that indicates that
  106 + * it has, and return -2 to indicate that
  107 + * we were told to break out of the loop.
  108 + */
  109 + p->break_loop = 0;
  110 + return -2;
  111 + }
  112 +
  113 + /*repeat until a packet is read
  114 + *a NULL message means :
  115 + * when no packet is in queue or all packets in queue already read */
  116 + do {
  117 + /* receive packet in non-blocking mode
  118 + * GCT_grab is defined in the septel library software */
  119 + h = GCT_grab(id);
  120 +
  121 + m = (MSG*)h;
  122 + /* a couter is added here to avoid an infinite loop
  123 + * that will cause our capture program GUI to freeze while waiting for a packet*/
  124 + counter++ ;
  125 +
  126 + }
  127 + while ((m == NULL)&& (counter< 100)) ;
  128 +
  129 + if (m != NULL) {
  130 +
  131 + t = h->type ;
  132 +
  133 + /* catch only messages with type = 0xcf00 or 0x8f01 corrsponding to ss7 messages*/
  134 + if ((t != 0xcf00) && (t != 0x8f01)) {
  135 + relm(h);
  136 + goto loop ;
  137 + }
  138 +
  139 +
  140 + dp = get_param(m);/* get pointer to MSG parameter area (m->param) */
  141 + packet_len = m->len;
  142 + caplen = p->snapshot ;
  143 +
  144 +
  145 + if (caplen > packet_len) {
  146 +
  147 + caplen = packet_len;
  148 + }
  149 + /* Run the packet filter if there is one. */
  150 + if ((p->fcode.bf_insns == NULL) || bpf_filter(p->fcode.bf_insns, dp, packet_len, caplen)) {
  151 +
  152 +
  153 + /* get a time stamp , consisting of :
  154 + *
  155 + * pcap_header.ts.tv_sec:
  156 + * ----------------------
  157 + * a UNIX format time-in-seconds when he packet was captured,
  158 + * i.e. the number of seconds since Epoch time (January 1,1970, 00:00:00 GMT)
  159 + *
  160 + * pcap_header.ts.tv_usec :
  161 + * ------------------------
  162 + * the number of microseconds since that second
  163 + * when the packet was captured
  164 + */
  165 +
  166 + (void)gettimeofday(&pcap_header.ts, NULL);
  167 +
  168 + /* Fill in our own header data */
  169 + pcap_header.caplen = caplen;
  170 + pcap_header.len = packet_len;
  171 +
  172 + /* Count the packet. */
  173 + p->md.stat.ps_recv++;
  174 +
  175 + /* Call the user supplied callback function */
  176 + callback(user, &pcap_header, dp);
  177 +
  178 + processed++ ;
  179 +
  180 + }
  181 + /* after being processed the packet must be
  182 + *released in order to receive another one */
  183 + relm(h);
  184 + }else
  185 + processed++;
  186 +
  187 + }
  188 +
  189 + while (processed < cnt ) ;
  190 +
  191 + return processed ;
  192 +}
  193 +
  194 +/*
  195 + * Get a handle for a live capture from the given Septel device. Always pass a NULL device
  196 + * The promisc flag is ignored because Septel cards have built-in tracing.
  197 + * The to_ms parameter is also ignored as it is
  198 + * not supported in hardware.
  199 + *
  200 + * See also pcap(3).
  201 + */
  202 +pcap_t *septel_open_live(const char *device, int snaplen, int promisc, int to_ms, char *ebuf) {
  203 + pcap_t *handle;
  204 +
  205 + handle = malloc(sizeof(*handle));
  206 + if (handle == NULL) {
  207 + snprintf(ebuf, PCAP_ERRBUF_SIZE, "malloc %s: %s", device, pcap_strerror(errno));
  208 + return NULL;
  209 + }
  210 +
  211 + /* Initialize some components of the pcap structure. */
  212 +
  213 + memset(handle, 0, sizeof(*handle));
  214 +
  215 + handle->snapshot = snaplen;
  216 +
  217 + if ((handle->linktype = septel_get_datalink(handle)) < 0) {
  218 + snprintf(ebuf, PCAP_ERRBUF_SIZE, "septel_get_linktype %s: unknown linktype\n", device);
  219 + goto fail;
  220 + }
  221 +
  222 + handle->bufsize = 0;
  223 +
  224 +
  225 + /*
  226 + * "select()" and "poll()" don't work on Septel queues
  227 + */
  228 + handle->selectable_fd = -1;
  229 +
  230 + handle->read_op = septel_read;
  231 + handle->setfilter_op = septel_setfilter;
  232 + handle->set_datalink_op = septel_set_datalink;
  233 + handle->getnonblock_op = pcap_getnonblock_fd;
  234 + handle->setnonblock_op = septel_setnonblock;
  235 + handle->stats_op = septel_stats;
  236 + handle->close_op = septel_platform_close;
  237 +
  238 + return handle;
  239 +
  240 +fail:
  241 + if (handle != NULL) {
  242 + free(handle);
  243 + }
  244 +
  245 + return NULL;
  246 +}
  247 +
  248 +static int septel_stats(pcap_t *p, struct pcap_stat *ps) {
  249 + /*p->md.stat.ps_recv = 0;*/
  250 + /*p->md.stat.ps_drop = 0;*/
  251 +
  252 + *ps = p->md.stat;
  253 +
  254 + return 0;
  255 +}
  256 +
  257 +
  258 +int
  259 +septel_platform_finddevs(pcap_if_t **devlistp, char *errbuf)
  260 +{
  261 +unsigned char *p;
  262 + const char description[512]= "Intel/Septel device";
  263 + char name[512]="septel" ;
  264 + int ret = 0;
  265 + pcap_add_if(devlistp,name,0,description,errbuf);
  266 +
  267 + return (ret);
  268 +}
  269 +
  270 +
  271 +/*
  272 + * Installs the given bpf filter program in the given pcap structure. There is
  273 + * no attempt to store the filter in kernel memory as that is not supported
  274 + * with SEPTEL cards.
  275 + */
  276 +static int septel_setfilter(pcap_t *p, struct bpf_program *fp) {
  277 +if (!p)
  278 + return -1;
  279 + if (!fp) {
  280 + strncpy(p->errbuf, "setfilter: No filter specified",
  281 + sizeof(p->errbuf));
  282 + return -1;
  283 + }
  284 +
  285 + /* Make our private copy of the filter */
  286 +
  287 + if (install_bpf_program(p, fp) < 0) {
  288 + snprintf(p->errbuf, sizeof(p->errbuf),
  289 + "malloc: %s", pcap_strerror(errno));
  290 + return -1;
  291 + }
  292 +
  293 + p->md.use_bpf = 0;
  294 +
  295 +
  296 +
  297 + return (0);
  298 +}
  299 +
  300 +
  301 +static int
  302 +septel_set_datalink(pcap_t *p, int dlt)
  303 +{
  304 + return (0);
  305 +}
  306 +
  307 +static int
  308 +septel_setnonblock(pcap_t *p, int nonblock, char *errbuf)
  309 +{
  310 + return (0);
  311 +}
  312 +
  313 +static int
  314 +septel_get_datalink(pcap_t *p)
  315 +{
  316 + int linktype = -1;
  317 + return DLT_MTP2;
  318 +}
15 pcap-septel.h
... ... @@ -0,0 +1,15 @@
  1 +/*
  2 + * pcap-septel.c: Packet capture interface for Intel Septel card
  3 + *
  4 + * The functionality of this code attempts to mimic that of pcap-linux as much
  5 + * as possible. This code is only needed when compiling in the Intel/Septel
  6 + * card code at the same time as another type of device.
  7 + *
  8 + * Authors: Gilbert HOYEK (gil_hoyek@hotmail.com), Elias M. KHOURY
  9 + * (+961 3 485343);
  10 + *
  11 + * @(#) $Header: /tcpdump/master/libpcap/pcap-septel.h,v 1.1 2005-06-20 21:27:10 guy Exp $
  12 + */
  13 +
  14 +pcap_t *septel_open_live(const char *device, int snaplen, int promisc, int to_ms, char *ebuf);
  15 +
7 scanner.l
@@ -22,7 +22,7 @@
22 22
23 23 #ifndef lint
24 24 static const char rcsid[] _U_ =
25   - "@(#) $Header: /tcpdump/master/libpcap/scanner.l,v 1.101 2005-05-02 21:13:09 guy Exp $ (LBL)";
  25 + "@(#) $Header: /tcpdump/master/libpcap/scanner.l,v 1.102 2005-06-20 21:27:11 guy Exp $ (LBL)";
26 26 #endif
27 27
28 28 #ifdef HAVE_CONFIG_H
@@ -286,6 +286,11 @@ srnr|subrulenum return PF_SRNR;
286 286 reason return PF_REASON;
287 287 action return PF_ACTION;
288 288
  289 +sio return SIO;
  290 +opc return OPC;
  291 +dpc return DPC;
  292 +sls return SLS;
  293 +
289 294 [ \r\n\t] ;
290 295 [+\-*/:\[\]!<>()&|=] return yytext[0];
291 296 ">=" return GEQ;

0 comments on commit a0a4852

Please sign in to comment.
Something went wrong with that request. Please try again.