gilbert HOYEK wrote:

2-in pcap-linux.c only pcap-open-live and pcap-platform-finddevs contains
#ifdef HAVE_DAG_API ..... so do i have to make similar code (#if def HAVE_SEPTEL_API ...) to only these two funtions in pcap-linux.c ?

Yes.

3- pcap-linux.c contains #include pcap-int.h with contains at line 93
#ifdef HAVE_DAG_API
void *dag_mem_base; /* DAG card memory base address */
u_int dag_mem_bottom; /* DAG card current memory bottom pointer */
u_int dag_mem_top; /* DAG card current memory top pointer */
int dag_fcs_bits; /* Number of checksum bits from link layer */
int dag_offset_flags; /* Flags to pass to dag_offset(). */
#endif
};


so i would like to know what is this used for

It's used for information that's needed when capturing on a DAG device.

and if i have to make also a similar code for my septel device.

Only if you have to store per-open-Septel-device information in a pcap_t. I don't know very much about the Septel API, so I don't know whether you'll need any more information.


4- the same for :
(pcap.c  , line 68)
#ifdef HAVE_DAG_API
#include <dagnew.h>
#include <dagapi.h>
#endif

I don't know why those are in pcap.c - there's no code in pcap.c that's in #ifdef HAVE_DAG_API, and the only #ifdef HAVE_DAG_API in the header files is the one in pcap-int.h, and none of the stuff in the #ifdef requires any data types defined in any of the DAG header files.


You shouldn't need to add anything, unless you have to put something into the pcap_md structure in pcap-int.h that uses a data type defined by a Septel header file.

and for :
(inet.c , line 539)
#ifdef HAVE_DAG_API
        || strstr(device, "dag") != NULL
#endif

Septel devices won't have IP addresses, so you'll want to do the same test there, to avoid trying to ask the OS for the IP address of the device.


5- Finally what about functions other than init_linktype in gencode.c , like gen_linktype(proto),gen_gateway , gen_scode , gen_ecode , gen_broacast and others that contains code based on liketype .

Those don't apply, as the SS7 interfaces don't support "networking" in the sense of running IP/IPX/etc. on top of, say, MTP2, as far as I know.


"gen_linktype()" should do the same as DLT_LINUX_IRDA and DLT_DOCSIS, and say that link-layer type filtering isn't implemented.

All the other routines will handle unknown DLT_ types by giving a "that kind of filtering is only supported on..." errors, so you shouldn't need to change them.

If you want to support filtering on SS7, you might have to add new syntax to the filter code to allow filtering on point codes and the like.
-
This is the tcpdump-workers list.
Visit https://lists.sandelman.ca/ to unsubscribe.

Reply via email to