Networking Forums

Networking Forums > Computer Networking > Linux Networking > Problem when using netcat( nc ) to debug network program

Reply
Thread Tools Display Modes

Problem when using netcat( nc ) to debug network program

 
 
Steven Woody
Guest
Posts: n/a

 
      07-18-2007, 10:52 AM
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 P1 send some datagrams back to P2? 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.

 
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
Using NetCat (nc) to debug network program Steven Woody Linux Networking 0 07-18-2007 11:57 PM
Problem opening a listening port using netcat ( or other server ) bradphelan Linux Networking 3 10-06-2006 08:04 PM
problem printing from older DOS program in Windows XP network Jon Jones Wireless Networks 1 05-05-2006 02:48 PM
Netcat problem - please help Piotrek Linux Networking 4 03-03-2004 06:37 PM
netcat problem Oliver Cole Linux Networking 2 09-15-2003 11:04 PM



1 2 3 4 5 6 7 8 9 10 11