CodeGuru Home VC++ / MFC / C++ .NET / C# Visual Basic VB Forums Developer.com
Results 1 to 9 of 9
  1. #1
    George2 is offline Elite Member Power Poster
    Join Date
    Oct 2002
    Posts
    4,468

    Unhappy where can I find a tutorial about raw socket programming?

    Hi, everyone!

    I want to know where can find a nice online
    tutorial about raw socket programming on windows
    platform?


    Thanks in advance,
    George

  2. #2
    Join Date
    Apr 2002
    Location
    PA, USA
    Posts
    1,658
    http://www.codeguru.com/forum/showth...hreadid=231055

    Before you post, please check the FAQ section. There are a few FAQ questions about winsock programming that might enlighten you, and if not search code guru's code vault for an example program.
    =--=--=--=--=--=--=--=--=--=--=--=--=--=
    Please rate this post to show your appreciation for those that helped you.

    Before You Post A Question, Please Read This: How & When To Ask Your Question
    =--=--=--=--=--=--=--=--=--=--=--=--=--=

    -eli
    http://www.toad-software.com
    http://www.dailymission.com - Do It Daily

  3. #3
    George2 is offline Elite Member Power Poster
    Join Date
    Oct 2002
    Posts
    4,468

    Unhappy

    Thanks, Eli buddy!

    My trouble is I do not find some sample code about how
    to receive raw socket (raw socket input). In most tutorials, it
    only deals with how to output raw sockets (Ping and Tracert
    demo).

    Can you help?


    regards,
    George

  4. #4
    Join Date
    Apr 2002
    Location
    PA, USA
    Posts
    1,658
    You need to set your port to listen and then bind the socket.

    Here, check this tutorial out

    http://www.district86.k12.il.us/cent...ck/Lesson3.htm

    hth
    =--=--=--=--=--=--=--=--=--=--=--=--=--=
    Please rate this post to show your appreciation for those that helped you.

    Before You Post A Question, Please Read This: How & When To Ask Your Question
    =--=--=--=--=--=--=--=--=--=--=--=--=--=

    -eli
    http://www.toad-software.com
    http://www.dailymission.com - Do It Daily

  5. #5
    Join Date
    Nov 2002
    Location
    California
    Posts
    4,556
    This also is a good resource

    http://tangentsoft.net/wskfaq/

    It includes source code for its samples. Good luck!!

  6. #6
    Join Date
    Apr 2003
    Location
    Morelia, Mexico
    Posts
    40
    Eli Gassert, those are not raw sockets. Proof:
    sListen = socket(AF_INET, SOCK_STREAM, IPPROTO_IP);

    SOCK_STREAM is TCP.

    As far as i know there was no way to programm true raw sockets in windows, well until winxp, but i don't know if they included them or not.

    If you want to program raw sockets, you could do it in Linux, just research about the TCP packet structure and you're basically done.

    you're not trying to collapse the internet, are you?

    edit: the link posted by MikeAThon, have a nice overview of "almost raw" sockets. http://tangentsoft.net/wskfaq/advanced.html#rawsocket
    Last edited by Luis G; April 22nd, 2003 at 12:57 PM.
    int i;main(){for(;i["]<i;++i){--i;}"];read('-'-'-',i+++"hell\
    o, world!\n",'/'/'/'));}read(j,i,p){write(j/p+p,i---j,i/i);}

  7. #7
    Join Date
    Nov 2002
    Location
    Los Angeles, California
    Posts
    3,863
    Wakeup in the morning and kick the day in the teeth!! Or something like that.

    "i don't want to write leak free code or most efficient code, like others traditional (so called expert) coders do."

  8. #8
    Join Date
    May 1999
    Location
    Southern California
    Posts
    12,266
    Did you look in the SDK samples?

    I don't know how many of the following would help but here they are in case they do.

    WinSock-L HomePage
    WinSock Development Information
    sockaddr.com
    RAD University
    "Signature":
    My web site is Simple Samples.
    C# Corner Editor

  9. #9
    George2 is offline Elite Member Power Poster
    Join Date
    Oct 2002
    Posts
    4,468

    Talking

    Thanks, souldog buddy!

    The material is very helpful!


    regards,
    George

    Originally posted by souldog
    RAW SOCKETS

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  





Click Here to Expand Forum to Full Width

Featured