using sockets to sniff/xmit

using sockets to sniff/xmit

Post by Jie_Shong_Daniel » Fri, 10 Jul 1998 04:00:00

Hi people,

I have a simple packet sniffer program in c (linux) that uses

fd=socket(AF_INET, SOCK_PACKET, htons(0x800));

and promiscuous mode.

I want to edit this program so it can transmit packets, as well as sniff
those packets that are transmitted ie. can I use the same socket to transmit, as well as sniff?

At the moment, the program doesn't need connect() to work.
Do I need to use connect() to transmit packets? If so, how do I know what valuesto choose from for struct sockaddr *serv_addr? What about int addrlen?




Daniel (Jie Shong) Ng           4th Year Undergraduate   The University of Melbourne  


1. ? attempt to xmit but no xmit i/o buffer

I'm getting a message in /var/adm/messages:
        "attempt to xmit but no xmit i/o buffers"
        server: sparc 10 96mb, solaris 2.3 - standard patches,
                sun's fddi, nfs
        client: sun ipx, ethernet, nfs mounted fs from the server,
                running an intense read test (100MB/10Krecs).
I'm testing concurrent reads from 12 ipx clients attached to the
fddi ring via 12 ethernets. the clients start reading and the
messages come out in the servers message file... and all slows
to a crawl.

Any ideas on what parameter(s) to change to allow more xmit buffers?

2. Adding new system call

3. token ring message - tr0: xmit ret_code: 22 xmit error code: 00

4. Has anyone success with ASUS SP3, Quantum SCSI-HD and Linux 1.3.36?

5. Token Ring error xmit ret_code: 22 xmit error code: 88

6. udma66 please read

7. bf0: attempt to xmit but no xmit i/o

8. batch system available soon

9. Socket xmit out of sequence?

10. cannot open mouse: invalid arguement... HELP *sniff sniff*

11. sniff sniff...I smell fire

12. Sniff local IPC via Unix Domain Socket

13. detailed description of linux socket filter and sniffing problem