SANGOMA

Wanpipe Ethereal S514 Datascoping


Using Ethereal,  Wanpipe HDLC driver and S514 serial cards one can create a sufisticated datascope for any serial (RS232/V35) HDLC based protocol.

  1. Overview
  2. Wanpipe Driver Installation
  3. Wanpipe Configuration
  4. API Tracer to Etheral Format


Overview

A common datascoping scenario is to tap an RS232 line and connect the rx end of the tapped line to S514 Port PRIMARY and to connect tx end of the tapped line to S514 Port SECONDARY.

In this scenario the S514 CPU A -> Port PRI  will be receiving the rx data stream
                                S514 CPU B -> Port SEC will be receiving the tx data stream

From driver point of view, there will be two network interfaces: w1g1 and w2g1.  The interface w1g1 will be connected to Port PRI and interface w2g1 will be connected to Port SEC.

In order to use Ethereal to decode the rx and tx stream, both rx and tx data streams must be first integrated together using an API applicatoin based on data timestamps.  As incoming data is writen to a file, data must be writen in Ethereal Format.

Once the API application is finished tracing/integrating both streams into a file.  The file can be opened with Ethereal application and analysed.



Wanpipe Driver Installation

  1. Download the latest STABLE driver.
  2. Untar the driver in /usr/src directory
  3. cd /wanpipe
  4. Run ./Setup install
    Proceed with ALL default options.
  5. Finish Installation
  6. Run: wanrouter hwprobe
    Visually confirm that you have S514 cards in your computer



Wanpipe Configuration

  1. Copy the wanpipe1 configuration file into /etc/wanpipe directory.
  2. Rename it to wanpipe1.conf

  3. Copy the wanpipe2 configuration file into /etc/wanpipe directory.
  4. Rename it to wanpipe2.conf

  5. Run wanrouter hwprobe
    Confirm the PCISLOT and PCIBUS info.

  6. Change wanpipe1.conf and wanpipe2.conf pci info based on wanrouter hwprobe.

  7. Configure both devices for boot start
    --> wanrouter wanrc
         specify: wanpipe1 wanpipe2

  8. Start wanpipe devices
    --> wanrouter start

  9. Check that wanpipe has started properly in /var/log/messages
    --> tail -f /var/log/messages




API Tracer Application to Etheral Format

The Sample API applications are located in /etc/wanpipe/api/aft directory.
Since the Sangoma API is identical for all S514 and AFT cards in this example we will be using the aft API sample code since it is the latest.  Once an also take a look at /etc/wanpipe/api/chdlc/ for reference.

The Sangoma API is Socket based. One would open 2 sockets on interface w1g1 and interface w2g1. Then read each interface in an infinite loop and write all received rx data frames into a single ethereal formated file.

The example code on how to write ethereal formated code is in wanpipe source directory.

 

  1. cd wanpipe/utis/wanpipemon
  2. vi prot_trace.c
    The prot_trace.c has the pcap functions that are used to create pcap/ethereal type file.
    You will notice that a print_pcap_file_header() function is called to write the inital pcap header before data frames are written into a file

    The way that ethereal knows what protocol to trace is by fh.network variable in the pcap header.
    You can see all the protocol definitions in wanpipemon.c -> structure trace_prot_opt[].

This information should be enought for you to write your own sample applicatoin that reads rx and tx data stream and creates a pcap/ethereal trace file.




Attachments

NameVersionSizeDateUser
wanpipe1.s514_hdlc_tap3281210/20/06 12:50 PMncorbic
Must be copied in /etc/wanpipe and renamed to wanpipe1.conf
wanpipe2.s514_hdlc_tap1281210/20/06 12:50 PMncorbic
Must be copied in /etc/wanpipe and renamed to wanpipe1.conf

Site

Changes
Index
Search

 

User

 

Log In
Register

 
 

Last Modified 10/20/06 1:04 PM