File: dnet_conn.3

package info (click to toggle)
dnprogs 2.52
  • links: PTS
  • area: main
  • in suites: squeeze
  • size: 3,644 kB
  • ctags: 4,021
  • sloc: ansic: 26,737; cpp: 10,666; makefile: 832; sh: 537; awk: 13
file content (59 lines) | stat: -rw-r--r-- 1,071 bytes parent folder | download | duplicates (8)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
.TH DNET_CONN 3 "July 28, 1998" "DECnet database functions"
.SH NAME
dnet_conn \- Connect to remote DECnet object by name.
.SH SYNOPSIS
.B #include <netdnet/dn.h>
.br
.B #include <netdnet/dnetdb.h>
.br
.sp
.B int dnet_conn (char *hostname, char *objname, int type, int,int,int,int)
.sp
.SH DESCRIPTION

.B dnet_conn
connects to the remote object 
.B objname
in host
.B hostname 
using the protocol denoted by
.B type
usually DNPROTO_NSP.
If successful, returns an integer file descriptor, else return errno.



.SH EXAMPLE
.nf

#include <netdnet/dn.h>
#include <netdnet/dnetdb.h>
#include <sys/socket.h>

main(void)
{
    int sockfd;

    sockfd=dnet_conn("mv3100","X$X0",DNPROTO_NSP,0,0,0,0);
    if (sockfd < 0) 
    	printf ("Error connecting to remote object X$X0 on node mv3100");
    else
    {
    	printf ("Succesfully connected to remote object X$X0 on node mv3100");
    	close (sockfd);
     }
}
.fi




.SH SEE ALSO

.BR dnet_addr (3),
.BR dnet_htoa (3),
.BR dnet_ntoa (3),
.BR getnodeadd (3),
.BR getnodebyname (3),
.BR getnodebyaddr (3),
.BR setnodeent (3)