[a / b / c / d / e / f / g / gif / h / hr / k / m / o / p / r / s / t / u / v / vg / vm / vmg / vr / vrpg / vst / w / wg] [i / ic] [r9k / s4s / vip] [cm / hm / lgbt / y] [3 / aco / adv / an / bant / biz / cgl / ck / co / diy / fa / fit / gd / hc / his / int / jp / lit / mlp / mu / n / news / out / po / pol / pw / qst / sci / soc / sp / tg / toy / trv / tv / vp / vt / wsg / wsr / x / xs] [Settings] [Search] [Mobile] [Home]
Board
Settings Mobile Home
/g/ - Technology


Thread archived.
You cannot reply anymore.


[Advertise on 4chan]


File: Tumblr_l_7248010071817.jpg (256 KB, 835x1149)
256 KB
256 KB JPG
previous: >>108196251

#define __NR_setsockopt            54
#define __NR_getsockopt 55

https://man7.org/linux/man-pages/man2/getsockopt.2.html
https://man7.org/linux/man-pages/man7/socket.7.html
https://man7.org/linux/man-pages/man7/ip.7.html
https://man7.org/linux/man-pages/man7/ipv6.7.html
https://man7.org/linux/man-pages/man7/unix.7.html
https://man7.org/linux/man-pages/man7/ddp.7.html
https://man7.org/linux/man-pages/man7/packet.7.html
https://man7.org/linux/man-pages/man7/x25.7.html
https://man7.org/linux/man-pages/man7/netlink.7.html

the final day of sockets (for a while, at least. not sure if there are any more in the future)
thank GOD. so tired of these...
anyway, here's your fcntl, bro
as a heads up, tomorrow's syscall should be really really cool, so keep an eye out

relevant resources:
man man

man syscalls

https://man7.org/linux/man-pages/
https://linux.die.net/man/
https://elixir.bootlin.com/linux/
https://elixir.bootlin.com/musl/
https://elixir.bootlin.com/glibc/
>>
well, at least it's the weekend today, so i can b*mp
>>
>>108205379
Everybody who writes C probably used getsockopt at some point, but probably nobody bothered looking into its inner workings, but to be honest, it doesn't seem to interesting to learn more about it than just that which is needed to program with it.

>as a heads up, tomorrow's syscall should be really really cool, so keep an eye out
Sure, looking forward to it. Pinky-finger promise that I won't look it up.
>>
heh, that's a whole lotta manpages

>>108206132
I haven't even used sockets in ages, I just do very little network programming.
>Pinky-finger promise that I won't look it up.
I really, really want to look, lol
>>
>>108206132
>but probably nobody bothered looking into its inner workings
Most people don’t know how to read the fucking source.
>>
>>108205379
Every platform interface should have functions like these that let you enable additional features / extensions or tweak stuff. You get kTLS, UDP offloading, packet filtering, TCP fast open, a huge amount of tweakables through setsockopt, and none of these cause ABI breakages since no new syscalls are added for any of those. I wish the manpages were better on some of the extensions though.
>>
bampu
>>
>SO_BSDCOMPAT
>Enable BSD bug-to-bug compatibility. This is used by the UDP protocol module in Linux 2.0 and 2.2. If enabled, ICMP errors received for a UDP socket will not be passed to the user program. In later kernel versions, support for this option has been phased out: Linux 2.4 silently ignores it, and Linux 2.6 generates a kernel warning (printk()) if a program uses this option. Linux 2.0 also enabled BSD bug- to-bug compatibility options (random header changing, skipping of the broadcast flag) for raw sockets with this option, but that was removed in Linux 2.2.
Neat



[Advertise on 4chan]

Delete Post: [File Only] Style:
[Disable Mobile View / Use Desktop Site]

[Enable Mobile View / Use Mobile Site]

All trademarks and copyrights on this page are owned by their respective parties. Images uploaded are the responsibility of the Poster. Comments are owned by the Poster.