Thread: What difference between the raw sockets

  1. #1
    Registered User
    Join Date
    Jun 2011
    Posts
    50

    What difference between the raw sockets

    I read some codes about socket in linux,I find
    sometimes it creates raw socket using socket(AF_INET,SOCK_RAW,IPPROTO_RAW),
    sometimes using socket(AF_INET,SOCK_RAW,IPPROTO_ICMP),
    I want to know what difference between them?and what time we
    creates raw socket using socket (AF_INET, SOCK_RAW, IPPROTO_RAW)?
    and what time using socket (AF_INET, SOCK_RAW,IPPROTO_ICMP)?
    Thank you very much.

  2. #2
    and the hat of int overfl Salem's Avatar
    Join Date
    Aug 2001
    Location
    The edge of the known universe
    Posts
    39,659
    If you dance barefoot on the broken glass of undefined behaviour, you've got to expect the occasional cut.
    If at first you don't succeed, try writing your phone number on the exam paper.

Popular pages Recent additions subscribe to a feed

Similar Threads

  1. Sockets tutorial, datagram sockets example not working for me
    By caesius in forum Networking/Device Communication
    Replies: 14
    Last Post: 12-26-2009, 03:40 PM
  2. Difference between Unix sockets and winsock.
    By antex in forum Networking/Device Communication
    Replies: 15
    Last Post: 01-21-2005, 04:53 PM
  3. Sockets
    By Cowboy in forum Networking/Device Communication
    Replies: 6
    Last Post: 12-01-2004, 01:41 PM
  4. ssl sockets
    By champ in forum Linux Programming
    Replies: 1
    Last Post: 04-06-2003, 12:51 AM
  5. Sockets
    By Twiggy in forum Windows Programming
    Replies: 8
    Last Post: 03-31-2003, 09:01 AM