I am unable to understand or grasp rather; what it means to program at a lower layer in socket programming. I am used to working with tcp/udp/file system sockets. These are all wrapped around their own protocol specifications … which as i understand would make it working at the application layer in the stack.
In the project i am on , i have seen some files which are “named” LinkLayer, TransportLayer… but i don’t see any more calls other than standard socket calls….send /recv/ seletct…
Does the fact you are setting a socket options mean you are programming at a lower level ? Is it just restricted to it? Or are there other API’s which grant you access at the representation in kernel ?
Typically this refers to using SOCK_RAW sockets, which requires you to assemble your own packet headers, calculate checksums, etc. You still use send/recv/etc. but now you are responsible for making sure every bit is in the right place.
You can use SOCK_RAW sockets to implement protocols other than TCP or UDP, or to do things with the Internet protocols that higher-level interfaces don’t accommodate (like tweaking the TTL of your packets to implement something like traceroute).