c - Why is the maximal path length allowed for unix-sockets on linux 108? -
when creating unix socket, path name (man 7 unix
) allowed maximally 108 chars long. friend caused bug in program because path longer. wonder how number determined.
i have suspicion number determined sizeof
of struct sockaddr_un
unambiguous compared sizeof of other sockaddresses sockaddr_in
. if wanted avoid clashes other sizeof values, why not use prime number example? can please provide authorative source that?
it match space available in handy kernel data structure.
edit:
quoting "the design , implementation of 4.4bsd operating system" mckusick et. al. (page 369):
the memory management facilities revolve around data structure called mbuf. mbufs, or memory buffers, 128 bytes long, 100 or 108 bytes of space reserved data storage.
Comments
Post a Comment