Solaris network analyser

Solaris network analyser

Post by noid.. » Mon, 27 Nov 2000 04:00:00



I am writing a program which, amongst other things, has to read raw tcp
packets. This is supposed to run on Solaris (I wouldn't have any probs
doing it for BSD).
Here's how I do it:
fd=socket(AF_INET, SOCK_RAW, IPPROTO_TCP);
...check if the socket's been created...
strcpy(ifr.ifr_name, "hme0"); /* interface to open */
s=ioctl(fd, SIOCGIFFLAGS, &ifr); /* retrieve flags */
...check if the flags have been retrieved...
I don't need IFF_PROMISC so I don't set it
That's all there should be to it. The socket gets created, the interface
gets opened, the only problem is that nothing is ever read from that
socket.
Can anyone point out what I'm doing wrong, or point me in the direction
of a simple and up-to-date code for a Solaris sniffer.
Thanks in advance

Sent via Deja.com http://www.deja.com/
Before you buy.

 
 
 

1. Solaris network analyzer

Hi
I am writing a program which, amongst other things, has to read TCP
packets off the network.
This is supposed to run on Solaris (I wouldn't have probs doing it for
BSD).
Here's how I do it:

fd=socket(AF_INET, SOCK_RAW, IPPROTO_TCP); /* open the socket */
...check if the socket has been opened...
strcpy(ifr.ifr_name, "hme0");    /* the interface we're listening on */
s=ioctl(fd, SIOCGIFFLAGS, &ifr);   /* retrieve flags */
...check if the flags have been successfully retrieved...

That's all there should be to it.
It would work very well on BSD on eth0.
On Solaris the interface gets opened, the socket listens but never reads
anything.
Can anyone tell me what I'm doing wrong or point me in the direction of
a good
up-to-date sniffer code for Solaris.
Thanks

Sent via Deja.com http://www.deja.com/
Before you buy.

2. Logitech QuickCam Pro 4000 and SoundBlaster Live 1024 on Gentoo System

3. NFS versus FTP Performance

4. New WebTrends Log Analyzer, Proxy Analyzer & Link Analyzer is now available

5. CM206 programming question?

6. Network analyzer for Solaris X86...

7. clock woops

8. suggest network analyzer for total network newbie?

9. Network Analyser for IPX Network?

10. Any good network analyzer?

11. Ethernet Network Analyzer, Monitor, and Packet Generator Software

12. help for network analyzer