This section provides connection information using Connect functions.
In order to establish a connection to a DECnet peer, the parameter name should point to a sockaddr_dn structure.
#include <ws2dnet.h>
int WSAAPI connect ( SOCKET s, const struct sockaddr_dn FAR * name,
int namelen );
int WSAAPI WSAConnect ( SOCKET s, const struct sockaddr_dn FAR * name,
int namelen, LPWSABUF lpCallerData, LPWSABUF lpCalleeData,
GROUP g, LPQOS lpSQOS, LPQOS lpGQOS );
int WSPAPI WSPConnect( SOCKET s, const struct sockaddr_dn FAR * name, int namelen, LPWSABUF lpCallerData, LPWSABUF lpCalleeData, LPQOS lpSQOS, LPQOS lpGQOS, int FAR * lpErrno );
name | A pointer to a sockaddr_dn structure which contains the DECnet address and object to which the socket is to be connected. |
DECnet sockets support supports the exchange of up to 16 bytes of optional data on a WSAConnect. It also supports the sending of DECnet access control information from the client to the server on a connect request.
#include <ws2dnet.h>
int WSAAPI WSAConnect ( SOCKET s, const struct sockaddr_dn FAR * name,
int namelen, LPWSABUF lpCallerData, LPWSABUF lpCalleeData,
GROUP g, LPQOS lpSQOS, LPQOS lpGQOS );
int WSPAPI WSPConnect( SOCKET s, const struct sockaddr_dn FAR * name, int namelen, LPWSABUF lpCallerData, LPWSABUF lpCalleeData, LPQOS lpSQOS,LPQOS lpGQOS, int FAR * lpErrno );
lpCallerData | A pointer to the user data that is to be transferred from the client to the server during connection establishment. |
lpCalleeData | A pointer to the optional data that is to be transferred back from the server during connection establishment. |
DECnet optional data is passed in an optdata_dn structure. Access control data is passed in an accessdata_dn structure.
The lpCallerData should point to a calldata_dn structure which contains concatenated opdata_dn and accessdata_dn structures. If lpCallerData is set to NULL, no additional data will be sent to the server. If either the opdata_dn.opt_optl or the accessdata_dn.acc_userl are set to zero, that portion of the structure should be ignored.
If lpCalleeData is set to NULL, no optional data will be read from the server. If either the opdata_dn.opt_optl or the accessdata_dn.acc_userl are set to zero, that structure should be ignored. The accept only returns optional data, not access data so the lpCalleeData pointer should point to a buffer containing the opdata_dn structure. If lpCalleeData is set to NULL no optional data will be read from the server.