Refer:
Linux Kernel Source: net/ipv4/af_inet.c
Linux Kernel Source: include/uapi/linux/in.h
Linux Kernel Source: struct proto udp_prot
Linux Kernel Source: struct proto tcp_prot

a Linux and Tech Youtube Channel for advance Linux users, systems and network software programmers and tech enthusiasts
Refer:
Linux Kernel Source: net/ipv4/af_inet.c
Linux Kernel Source: include/uapi/linux/in.h
Linux Kernel Source: struct proto udp_prot
Linux Kernel Source: struct proto tcp_prot