Ethereal-users: RE: [Ethereal-users] Mimicking the Cisco Call Manager.

Note: This archive is from the project's previous web site, ethereal.com. This list is no longer active.

From: "Visser, Martin (SNO)" <Martin.Visser@xxxxxxxxxx>
Date: Wed, 14 Feb 2001 13:42:12 +0800
Jonathan,

I'm an expert in socket programming, however you haven't said what isn't
working. Are you able to actually open the socket and send data? If so, have
you captured your output with ethereal to compare? You also need to consider
the host-to-network byte ordering.

I think that "Stevens" is the definitive book on network programming that
you may want to look at. Or even look at code for programs such as "iperf"
that do simple network perforance stuff using UDP and TCP

Martin

Martin Visser
Technology Consultant - Compaq Global Services

Compaq Computer Australia
410 Concord Road
Rhodes, Sydney NSW 2138
Australia

Phone: +61-2-9022-5630
Mobile: +61-411-254-513
Fax:+61-2-9022-7001
Email:martin.visser@xxxxxxxxxx


> -----Original Message-----
> From: Jonathan Anand Fernandes [mailto:jonathan@xxxxxxxxxxxxxxx]
> Sent: Sunday, 11 February 2001 5:37 AM
> To: ethereal-users@xxxxxxxxxxxx
> Subject: [Ethereal-users] Mimicking the Cisco Call Manager.
> 
> 
> Hi all -
> 
> The big picture :
> 	I have been working with the Cisco IP phones 7960 for 
> the last couple
> of weeks. The IP phones require a Call Manager in order to 
> make any calls.
> I want to replace the Cisco Manager with my own Call Manager, 
> but I want
> to achieve the most basic of operations - so nothing fancy here. 
> 
> What I have done:
> 	I used Ethereal to figure out what packets are being 
> sent between
> the Call Manager and the IP phones.( For example, when I pick up the
> reciever of the IP phone, the IP phone sends a TCP packet to the Call
> Manager,and the Call Manager sends a TCP packet back, which 
> triggers off
> the dial tone on the IP phone). I did some socket 
> programming, so that I
> have a TCP server that I hope will model the Call Manager. The idea is
> that this server will recieve whatever data has been sent by 
> the IP phone,
> but will send the data that will trigger off the dial tone on the IP
> phone. (I got this data previously from a *real* Call Manager 
> to IP phone
> capture, using Ethereal).
> 
> Here is a sample of the capture obtained from Ethereal -
> 
> Transmission Control Protocol, Src Port: 2000 (2000), Dst Port: 52332
> (52332), Seq: 1125651928, Ack: 1788356169
> Data (48 bytes)
> 
>    0  2800 0000 0000 0000 9900 0000 2020 2020   (...........     
>   10  2020 2020 2020 2020 2020 2020 2020 2020                    
>   20  3330 3236 2020 2020 2020 2020 0000 0000   3026        .... 
> 
> And this a fragment of server socket code, that I wrote. 
> 
> #include <stdlib.h>
> main()
> {
>   int i;
>    char a[49];
>   unsigned char t[49]={
> 0x28,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x99,0x00,0x00,0x00,0x
> 20,0x20,0x20,0x20,
> 0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x
> 20,0x20,0x20,0x20,
> 0x33,0x30,0x32,0x36,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x
> 00,0x00,0x00,0x00
>   };
> 
>   for ( i=0;i<49;i++){
> 	a[i]= t[i]; 
>   }
> 
>  /* I then send the data in the array a, to the IP phone via 
> a call to a
>  "write" function that will send the data to the IP phone, 
> the prototype 
> being writeString(int fd, char *strbuf)
> */
>    
> }
>     	
> What's wrong:
> 1. Am I making a mistake in the unsigned char to char, should 
> I be using
> another "type"?
> 2. Are their any glaring errors that I have missed?
> 
> I do realize this isn't a directly related Ethereal problem, 
> but I know
> this kind of stuff is second-nature to anyone who has done any serious
> development work or otherwise with Ethereal. I would *really* 
> appreciate
> all the help I can get.
> 
> Thanks again
> 
> jonathan
> 
> 
> 
> 
> _______________________________________________
> Ethereal-users mailing list
> Ethereal-users@xxxxxxxxxxxx
> http://www.ethereal.com/mailman/listinfo/ethereal-users
>