To get the local name for a DECnet socket, the parameter name should point to a sockaddr_dn structure.
#include <ws2dnet.h>
int WSAAPI getsockname ( SOCKET s, struct sockaddr_dn FAR * name, int FAR * namelen );
int WSPAPI WSPGetSockName( SOCKET s, struct sockaddr_dn FAR * name, int FAR * namelen, int FAR * lpErrno );
name | A pointer to a sockaddr_dn structure that will return the local name to which a DECnet socket is connected. |