Thread: sorry for my question if it sounds stupid

  1. #1
    Banned
    Join Date
    May 2008
    Location
    Four Dots Planet
    Posts
    72

    sorry for my question if it sounds stupid

    i just wanted to know what is the lowest level of network programming that is still done at software level for example we use NIC cards but that is hardware we use something high level like TCP/UDP but that is very high level so what is the lowest layer where the hardware work ends and the software work begins. i want to do some pretty low level network programming stuff on windows but i do not want to be concerned with the hardware and drivers stuff which is a needless nuisance for me just want to learn some lowest level networking stuff.

    hope someone understands what i mean and comes to help.

  2. #2
    Kernel hacker
    Join Date
    Jul 2007
    Location
    Farncombe, Surrey, England
    Posts
    15,677
    That would depend on the level of support in your hardware, but generally the "IP" stack is mainly implemented in hardware. How much of that is actually exposed so that you can get to it is another question, and one that I can't actually answer.

    Can you describe a bit more of what you actually want to achieve? It is always easier to answer specific question than generic ones - if nothing else because it's easier to limit the answer to only cover what you actually need to know to solve the particular problem.

    --
    Mats
    Compilers can produce warnings - make the compiler programmers happy: Use them!
    Please don't PM me for help - and no, I don't do help over instant messengers.

  3. #3
    Banned
    Join Date
    May 2008
    Location
    Four Dots Planet
    Posts
    72
    mats i wanted to implement the software level protocols myself or may be write a new protocol for myself i need to go lower than the layers of TCP/UDP where i can just read(buffer,size) and figure myself how to format the data or what to interpret the data as etc. and i want to see how the protocols check for error for time taken for valid routes etc. etc. there is so much stuff going on i just want to practice all this even if i could do that at very basic level. i am not finding right way to go about it as if now i am reading rfc tftp but it itself uses some UDP like stuff so i will try something like UDP myself.

    edit: as you mentioned mats about IP i searched for rfc udp and it seems to be using IP and if ip is at the hardware level i think i found my lowest software layer to start from.
    Last edited by (::); 05-16-2008 at 07:16 AM.

  4. #4
    Registered User
    Join Date
    May 2008
    Posts
    1

    Lowest protocol

    Lowest level where you can start off is at ethernet protocol level......after that comes IP/IPX then UDP/TCP etc....if you want to do low level..start off on IP...cause Ethernet protocols involves interaction with NIC cards, drivers etc

  5. #5
    Banned
    Join Date
    May 2008
    Location
    Four Dots Planet
    Posts
    72
    thanks sharadvasista i was also reading about it using google and i found that udp is lowest layer on ip which is implemented in hardware but then for using udp i need to use sockets which ask for AF_INET why should my socket care about address family can i go lower level than that also while googling i found a related term raw sockets which seem to me low level but even they need protocol family info like in the example socket was give AF_INET and if i did not get any suitable info on lowest level stuff i will carry on my own but first i am trying to implement tftp protocol myself.
    Last edited by (::); 05-16-2008 at 07:16 AM.

  6. #6
    Dr Dipshi++ mike_g's Avatar
    Join Date
    Oct 2006
    Location
    On me hyperplane
    Posts
    1,218
    What exactly are you trying to do here? In my Cisco classes we used the OSI reference model to label different networking layers:
    Code:
    7) APPLICATION      
    6) PRESENTATION   <- Stuff like Formattig, Encryption and Compression
    5) SESSION             <- maintaining connectivity
    4) TRANSPORT         <- Port numbers and Sequencing (TCP/UDP)
    3) NETWORK           <- Routing and Routed Protocols   (OSPF/EIGRP/RIP/IP/IPX)
    2) DATA-LINK          <- ARP 
    1) PHYSICAL            <- Cables / Electric signals
    Layers 2 to 4 each add their own layer of encapsulation (header/footer data). On a DTE end you will only really need to deal with stuff at level 4 and higher, but you can get info from the other headers. The only layer that dosent use any software is the physical layer, the layers 2 and 3 run on DCE protocols. To find out how to interpret the data google stuff like 'frame header', 'packet header' , and 'segment header'. For layers 2, 3, and 4 respectively. From there hopefully you should be able to deconstruct the datagrams. Header info can also vary depending on what protocols are being used. I have no experience with programming any of this stuff in C btw.

  7. #7
    Banned
    Join Date
    May 2008
    Location
    Four Dots Planet
    Posts
    72
    thanks mike_g i will try to use raw sockets and implement udp myself or maybe something of my own i had heard that xp has disabled raw sockets because of some security concerns i think i will need to use linux for this stuff.

Popular pages Recent additions subscribe to a feed

Similar Threads

  1. I know this sounds stupid.....
    By joeprogrammer in forum C++ Programming
    Replies: 5
    Last Post: 02-16-2006, 12:29 PM
  2. Replies: 7
    Last Post: 11-04-2005, 12:17 AM
  3. Stupid Question
    By digdug4life in forum C++ Programming
    Replies: 22
    Last Post: 05-17-2005, 11:43 AM
  4. stupid, stupid question
    By xelitex in forum C++ Programming
    Replies: 5
    Last Post: 12-22-2004, 08:22 PM
  5. stupid question
    By maes in forum A Brief History of Cprogramming.com
    Replies: 14
    Last Post: 11-08-2001, 11:48 AM