Thread: Network protocol implementation in C (Example) - Documentation

  1. #1
    Registered User
    Join Date
    Feb 2010
    Posts
    72

    Network protocol implementation in C (Example) - Documentation

    Hi,

    Can someone give me a link to a documentation EXAMPLE on how to implement a network protocol using C language. Thanks for your help.

  2. #2
    Registered User
    Join Date
    Aug 2003
    Posts
    1,218
    Any specifc network protocol? A network protocol is basicly a set of rules that those using the protocol adheres to; when sending this message i expect to get this back, this message has this structure and so on. How such a protocol is designed is completely application-specific.

    Go read the networks section of these boards, they have links that will give you a start, eg how to get 2 programs communicating over network.

  3. #3
    Registered User
    Join Date
    Feb 2010
    Posts
    72
    Thanks, i know how networks works (Sockets,...etc) i want to implement by my self a simple protocol with headers, payloads, checksums... and some messages exchanging so i want an example documentation.

    Thanks for help.

  4. #4
    Registered User
    Join Date
    Aug 2003
    Posts
    1,218
    Well I think you will be hardpressed to find anything like a tutorial for implementing a network protocol. There may be books that take this approach but that I don't know. If I were you I would just start communicating betwean 2 programs and then just add rules to the protocol, making sure they work as expected and so on.

  5. #5
    Banned
    Join Date
    Aug 2010
    Location
    Ontario Canada
    Posts
    9,547
    Quote Originally Posted by evariste View Post
    Hi,

    Can someone give me a link to a documentation EXAMPLE on how to implement a network protocol using C language. Thanks for your help.
    Winsock Programmer’s FAQ: Winsock Programmer's FAQ

    If you're looking for headers, etc. Keep in mind that every network packet has it's own header applied by TCPIP... pretty much all you need to worry about it your data.

  6. #6
    Registered User
    Join Date
    Feb 2010
    Posts
    72
    Thanks CommonTater, i'm using Linux. And i want a documentation that explain how to implement FSM of the protocol, sending messages, answer messages... Etc.

    Thanks.

  7. #7
    Banned
    Join Date
    Aug 2010
    Location
    Ontario Canada
    Posts
    9,547
    Winsock and Linux sockets are close enough you should be able to suss it out... Read the tutorial before you condemn it.

  8. #8
    Registered User
    Join Date
    Feb 2010
    Posts
    72
    i'm not against Windows

Popular pages Recent additions subscribe to a feed

Similar Threads

  1. Where are network protocol structs defined?
    By homer_3 in forum Windows Programming
    Replies: 3
    Last Post: 04-13-2010, 04:05 PM
  2. Webdav Protocol implementation
    By ujwala in forum C Programming
    Replies: 1
    Last Post: 03-20-2010, 06:21 AM
  3. EDCF protocol in Network simulation program
    By linux_007 in forum C++ Programming
    Replies: 0
    Last Post: 04-12-2009, 03:04 PM
  4. FTP program
    By jakemott in forum Linux Programming
    Replies: 14
    Last Post: 10-06-2008, 01:58 PM
  5. Network headers documentation?
    By hacinn in forum C Programming
    Replies: 4
    Last Post: 07-25-2005, 12:43 PM