Where is sockaddr in




















Alex Shroyer 3, 2 2 gold badges 23 23 silver badges 48 48 bronze badges. Len Holgate Len Holgate See msdn. It states that the sockaddr structure is large enough to contain a transport address for most address families. So it is 14 bytes to make it large enough. No - IPv6 addresses are 16 bytes. In the past it was an arbitrary maximum, but it was for convenience rather than a hard limit.

MSDN is not authoritative for Posix. Refer to the Posix specs rather than vendor specific documentation: pubs. Show 3 more comments. Jerry Miller Jerry Miller 7 7 silver badges 11 11 bronze badges. Sign up or log in Sign up using Google. Sign up using Facebook. Sign up using Email and Password. Post as a guest Name. Email Required, but never shown.

The Overflow Blog. Does ES6 make JavaScript frameworks obsolete? Podcast Do polyglots have an edge when it comes to mastering programming Featured on Meta.

Now live: A fully responsive profile. Linked 8. Most socket functions require a pointer to a socket address structure as an argument. Structures defined in this chapter are related to Internet Protocol Family. This is a generic socket address structure, which will be passed in most of the socket function calls. Socket address structures are an integral part of every network program.

We allocate them, fill them in, and pass pointers to them to various socket functions. Sometimes we pass a pointer to one of these structures to a socket function and it fills in the contents. We always pass these structures by reference i. When a socket function fills in a structure, the length is also passed by reference, so that its value can be updated by the function. We call these value-result arguments.



0コメント

  • 1000 / 1000