"$sockaddr = 'S n a4 x8'" is a format string for packing a
sockaddr struct for passing to bind(2). it reads as follows:
basically, this is used to create the C struct byte-by-byte
to pass to 'bind(2)'. i'm not a C programmer, so it gets
beyond me here. from what i can infer, this struct is 2
bytes for the address family, 2 bytes for the port number,
and up to 12 bytes for the address. what you should probably
pay attention to are the arguments to pack with that format
string. possibly take a look at 'man 2 socket' and its
relatives like 'man 2 bind'as well, to determine the
signature of the system functions in question. the man
pages often describe the byte format of the relevant
structs (but unfortunately i can't find sockaddr in the glibc
docs).