Networking Forums

Networking Forums > Computer Networking > Linux Networking > Using NetCat (nc) to debug network program

Reply
Thread Tools Display Modes

Using NetCat (nc) to debug network program

 
 
Steven Woody
Guest
Posts: n/a

 
      07-18-2007, 11:57 PM
am about to use nc + xxd to debug a network process. the process
under test, say process P1, will send/receive binary data
( datagrams ) to/from another process, say process P2, via tcp socket.

so, i have nc act as the P2 as below,
nc -s 127.0.0.1 -l -p 9000 | xxd -g1
by this way i can see what sent from P1. thanks xxd ! but the
problem is, how can i have P2 send some datagrams back to P1? i need
to both directly inject the binary data stream and input some
datagrams in hexadecimal text format ( just as the form in which xxd
outputs ).

i once came out with a solution,
nc -s 127.0.0.1 -l -p 9000 < my.input | xxd -g1\
but it never work since after nc opened the my.input, what i did on
the file will not get know by the nc.

any idea? thanks in advance.

 
Reply With Quote
 
 
 
Reply

Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
how to use netcat??? Kolyn_Kryw Windows Networking 1 04-11-2008 04:14 PM
Problem when using netcat( nc ) to debug network program Steven Woody Linux Networking 0 07-18-2007 10:52 AM
Program Scheduler to start and end a program? Kevin Wooloff Home Networking 1 09-05-2006 04:10 PM
TCP Debug ValerioZ Linux Networking 0 11-27-2004 04:58 PM
How can I debug kernel & network driver during netperf test!! JoohyeonPark Linux Networking 2 10-11-2004 12:39 AM



1 2 3 4 5 6 7 8 9 10 11