Thread: A Few Questions About the OSI Model

  1. #1
    Set Apart -- jrahhali's Avatar
    Join Date
    Nov 2002
    Posts
    256

    A Few Questions About the OSI Model

    I'm learing about the OSI reference model in my networking class, and the layers and examples all seems a little vague to me.

    For example, I've learned that HTTP is one protocol that operates at the application layer. I know in definition what HTTP is, and why it is needed. But where is it located? Take the firefox application for example. I can find where it installs to, and know that firefox.exe is the main program. But what about protocols? Are they files that programs use? Do programs install their own specific protocols? Where are they?
    Clear the mines from our Shazbot!
    Get the enemy Shazbot!

  2. #2
    C++ Witch laserlight's Avatar
    Join Date
    Oct 2003
    Location
    Singapore
    Posts
    28,413
    Hint: programs implement protocols. (And so do humans!)
    Quote Originally Posted by Bjarne Stroustrup (2000-10-14)
    I get maybe two dozen requests for help with some sort of programming or design problem every day. Most have more sense than to send me hundreds of lines of code. If they do, I ask them to find the smallest example that exhibits the problem and send me that. Mostly, they then find the error themselves. "Finding the smallest program that demonstrates the error" is a powerful debugging tool.
    Look up a C++ Reference and learn How To Ask Questions The Smart Way

  3. #3
    Set Apart -- jrahhali's Avatar
    Join Date
    Nov 2002
    Posts
    256
    So the programmers who wrote the part of firefox that communicates with web servers to comply with HTTP standards? Is that fair to call the HTTP protocol a standard? Am I correct when I say that HTTP is a specific implementation of communication that defines how a program sends and receives data? Do they use APIs for this?
    Clear the mines from our Shazbot!
    Get the enemy Shazbot!

  4. #4
    [](){}(); manasij7479's Avatar
    Join Date
    Feb 2011
    Location
    *nullptr
    Posts
    2,657
    Quote Originally Posted by jrahhali View Post
    So the programmers who wrote the part of firefox that communicates with web servers to comply with HTTP standards? Is that fair to call the HTTP protocol a standard? Am I correct when I say that HTTP is a specific implementation of communication that defines how a program sends and receives data? Do they use APIs for this?
    Yes
    Yes
    Sort of
    Generally the OS supplies much of the API

  5. #5
    and the hat of int overfl Salem's Avatar
    Join Date
    Aug 2001
    Location
    The edge of the known universe
    Posts
    39,660
    HTTP is a protocol (that's what the 'P' stands for).
    Just like FTP, SMTP, RTP.

    All the internet protocol standards can be found here -> RFC-Editor Webpage

    > Do they use APIs for this?
    It depends how abstract you want to get.

    Berkeley sockets - Wikipedia, the free encyclopedia are somewhere between bashing bits directly in the hardware of your NIC, and having some high level function which takes a URL and gives you back a DOM tree of the HTML page in question.
    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.

  6. #6
    spurious conceit MK27's Avatar
    Join Date
    Jul 2008
    Location
    segmentation fault
    Posts
    8,300
    Quote Originally Posted by jrahhali View Post
    Is that fair to call the HTTP protocol a standard?
    Yes. WRT to the OSI model, HTTP is considered part of the "presentation" and "application" layers.

    Am I correct when I say that HTTP is a specific implementation of communication that defines how a program sends and receives data?
    More specifically then, HTTP is an application/presentation layer protocol, which is only part of what "defines how a program sends and receives data". The other parts on the web are the TCP transport layer protocol, the IP network layer protocol, and the ethernet data-link layer protocol, all of which require a software implementation. There is no distinct "session layer" on the internet -- the application/presentation layer works directly with the transport layer, as it does for all TCP/IP networking. This means the internet is really composed of only 4 software layers: datalink->network->transport->application/presentation.
    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

  7. #7
    Set Apart -- jrahhali's Avatar
    Join Date
    Nov 2002
    Posts
    256
    Great. Thanks everyone who replied.
    Clear the mines from our Shazbot!
    Get the enemy Shazbot!

Popular pages Recent additions subscribe to a feed

Similar Threads

  1. C++ COM STA model
    By George2 in forum Windows Programming
    Replies: 0
    Last Post: 03-24-2008, 03:10 AM
  2. Model conversion...
    By Nodtveidt in forum Tech Board
    Replies: 2
    Last Post: 12-08-2006, 08:33 AM
  3. Model orientations in 3D
    By VirtualAce in forum Game Programming
    Replies: 11
    Last Post: 11-14-2006, 12:21 AM
  4. Model 3
    By DavidP in forum A Brief History of Cprogramming.com
    Replies: 5
    Last Post: 05-24-2004, 09:25 AM
  5. YUV color model
    By nasir_sidd in forum C++ Programming
    Replies: 1
    Last Post: 12-10-2002, 03:42 PM