Howdy, Stranger!

It looks like you're new here. If you want to get involved, click one of these buttons!

Categories

C source code on generating TCP/IP packet

hi... I've got a problem and i hope you all will be willing to answer.

1. I am suppose to write a program ( in either C or java) to generate a TCP/IP packet and send the packet over a ethernet network? Do anyone here ever written or came across this type of programming source code? If yes, can you pls provide me some examples of this kind of programming as references? Or can anyone recommend me any useful web sites regarding to this?

I am currently in a midst on how to write a C/java program to generate/create a packet . I really hope that anyone can answer my question and will be willing to start corresponding with me.

thanks.


Comments

  • _codist__codist_ Member Posts: 17
    [b][red]This message was edited by _codist_ at 2004-10-1 7:44:31[/red][/b][hr]
    : hi... I've got a problem and i hope you all will be willing to answer.
    :
    : 1. I am suppose to write a program ( in either C or java) to generate a TCP/IP packet and send the packet over a ethernet network? Do anyone here ever written or came across this type of programming source code? If yes, can you pls provide me some examples of this kind of programming as references? Or can anyone recommend me any useful web sites regarding to this?
    :
    : I am currently in a midst on how to write a C/java program to generate/create a packet . I really hope that anyone can answer my question and will be willing to start corresponding with me.
    :
    : thanks.
    :
    :
    If you want to create only the tcp and ip headers yourself, you can do that using raw sockets. If you also want to include a self made ethernet header, you should probably use a library such as libnet (I don't know if it's impossible with raw sockets, I just couldn't figure out how to do it), but leaving the ethernet header creation to the OS should be fine unless you want to code some rather freaky network hacks =)

    I know a helpful tutorial about raw sockets, unfortunately it's in german ... If you don't know the language, let me know and I'll give you some hints and source code I've written for that matter.


Sign In or Register to comment.