Thread: Socket programming or....

Hybrid View

Previous Post Previous Post   Next Post Next Post
  1. #1
    Learning C. JOZZY& Wakko's Avatar
    Join Date
    Nov 2009
    Posts
    59

    Socket programming or....

    I almost finished the book "C by example" and I would like to know more about socket programming. Now my question was would I be smart to dive into socket programming or do you suggest reading up on a different subject first?

    Any titles of books would also by appreciated, thanks in advance.

  2. #2

  3. #3
    spurious conceit MK27's Avatar
    Join Date
    Jul 2008
    Location
    segmentation fault
    Posts
    8,300
    The book I started learning C with was a network programming book*, of sorts. It was intended for complete beginners, so the first chapter is called "Programming"; the third chapter is called "Networking" and covers the socket API.

    So no, I cannot even think of a subject that "it would be better for you to read first". And there is plenty of help available here, I don't think anyone who has been programming C for more than 6-12 months is unfamiliar with sockets. They are kind of essential IMO.

    * No Starch Press: Hacking: The Art of Exploitation, 2nd Edition ...great book
    C programming resources:
    GNU C Function and Macro Index -- glibc reference manual
    The C Book -- nice online learner guide
    Current ISO draft standard
    CCAN -- new CPAN like open source library repository
    3 (different) GNU debugger tutorials: #1 -- #2 -- #3
    cpwiki -- our wiki on sourceforge

  4. #4
    Jack of many languages Dino's Avatar
    Join Date
    Nov 2007
    Location
    Chappell Hill, Texas
    Posts
    2,337
    Quote Originally Posted by MK27 View Post
    ...I don't think anyone who has been programming C for more than 6-12 months is unfamiliar with sockets. They are kind of essential IMO.
    [/url] ...great book
    I better get with the program then (no pun intended... )
    Mainframe assembler programmer by trade. C coder when I can.

  5. #5
    spurious conceit MK27's Avatar
    Join Date
    Jul 2008
    Location
    segmentation fault
    Posts
    8,300
    Quote Originally Posted by Dino View Post
    I better get with the program then (no pun intended... )
    okay, lemme add a phrase "If you've been programming in C for more than 6-12 months, it won't take you more than a few hours to get to tackle".

    The socket API is a few structs and a dozen commands.
    C programming resources:
    GNU C Function and Macro Index -- glibc reference manual
    The C Book -- nice online learner guide
    Current ISO draft standard
    CCAN -- new CPAN like open source library repository
    3 (different) GNU debugger tutorials: #1 -- #2 -- #3
    cpwiki -- our wiki on sourceforge

  6. #6
    Learning C. JOZZY& Wakko's Avatar
    Join Date
    Nov 2009
    Posts
    59
    Quote Originally Posted by MK27 View Post
    The book I started learning C with was a network programming book*, of sorts. It was intended for complete beginners, so the first chapter is called "Programming"; the third chapter is called "Networking" and covers the socket API.

    So no, I cannot even think of a subject that "it would be better for you to read first". And there is plenty of help available here, I don't think anyone who has been programming C for more than 6-12 months is unfamiliar with sockets. They are kind of essential IMO.

    * No Starch Press: Hacking: The Art of Exploitation, 2nd Edition ...great book
    Is this book based on coding in C?

  7. #7
    Malum in se abachler's Avatar
    Join Date
    Apr 2007
    Posts
    3,195
    Quote Originally Posted by MK27 View Post
    * ...great book
    MK, you know better than to post hacking links...

  8. #8
    spurious conceit MK27's Avatar
    Join Date
    Jul 2008
    Location
    segmentation fault
    Posts
    8,300
    Quote Originally Posted by abachler View Post
    MK, you know better than to post hacking links...
    The author is not a hacker, he is a "security consultant" . I am not really sure whether he means to use the word prejudicially or not. In the introduction he does say:

    Quote Originally Posted by Jon Erickson
    the essence of hacking is finding unintended or overlooked uses for the laws and properties of a given situation and then applying them in new and inventive ways to solve a problem
    which is basically positive and pretty much describes his approach to writing a beginning book on (mostly) C programming. However, he does also introduce explicit examples of how "exploitation" works -- that is how I learned why a buffer overflow can be very bad, like not just segfault bad, for example.

    There are some historical examples of how people have done other bad things (how polymorphic shellcode is constructed, various "DoS attack" methods, TCP/IP hijacking, etc). By the time you are done*, if you are stupid enough, you should be ready to try out some obvious and well known exploit, get traced, and go to jail.

    *actually I am not. Polymorphic shellcode is in the last chapter, "cryptology". The book has a very steep curve in it, something you keep coming back to. It also very code heavy.
    Last edited by MK27; 11-29-2009 at 08:25 PM.
    C programming resources:
    GNU C Function and Macro Index -- glibc reference manual
    The C Book -- nice online learner guide
    Current ISO draft standard
    CCAN -- new CPAN like open source library repository
    3 (different) GNU debugger tutorials: #1 -- #2 -- #3
    cpwiki -- our wiki on sourceforge

  9. #9
    Learning C. JOZZY& Wakko's Avatar
    Join Date
    Nov 2009
    Posts
    59
    @MK27, Am I allowed to skip chapter 2 "programming" when I have basic understanding of variables, strings, functions, control structures etc.?

  10. #10
    Ex scientia vera
    Join Date
    Sep 2007
    Posts
    477
    Quote Originally Posted by abachler View Post
    MK, you know better than to post hacking links...
    Are you really that misinformed? A book that, first of all, discusses programming in C from a low level perspective along with network programming, and then addresses buffer overflows and cryptography is a 'hacking link' - and better yet, a 'hacking link' is a derogatory term?

    Ugh.
    "What's up, Doc?"
    "'Up' is a relative concept. It has no intrinsic value."

  11. #11
    Make Fortran great again
    Join Date
    Sep 2009
    Posts
    1,413
    Quote Originally Posted by IceDane View Post
    Are you really that misinformed? A book that, first of all, discusses programming in C from a low level perspective along with network programming, and then addresses buffer overflows and cryptography is a 'hacking link' - and better yet, a 'hacking link' is a derogatory term?

    Ugh.
    I think it was sarcasm on abachler's part...lol.

    Still, it peeves me as well when people don't know the difference between hackers and crackers.

  12. #12
    Jack of many languages Dino's Avatar
    Join Date
    Nov 2007
    Location
    Chappell Hill, Texas
    Posts
    2,337
    I'll put this on my list of to-do's to get to before the end of the year. (really)
    Mainframe assembler programmer by trade. C coder when I can.

Popular pages Recent additions subscribe to a feed

Similar Threads

  1. Socket error on non-blocking
    By newbie30 in forum C Programming
    Replies: 1
    Last Post: 09-01-2009, 07:09 AM
  2. Function call from another .c module
    By Ali.B in forum C Programming
    Replies: 14
    Last Post: 08-03-2009, 11:45 AM
  3. Problem with socket descriptors
    By McKracken in forum C Programming
    Replies: 1
    Last Post: 07-22-2009, 08:51 AM
  4. socket programming question, closing sockets...
    By ursula in forum Networking/Device Communication
    Replies: 2
    Last Post: 05-31-2009, 05:17 PM
  5. socket newbie, losing a few chars from server to client
    By registering in forum Linux Programming
    Replies: 2
    Last Post: 06-07-2003, 11:48 AM