1LFC_GETLINKS(3)              LFC Library Functions             LFC_GETLINKS(3)
2
3
4

NAME

6       lfc_getlinks - get the link entries associated with a given file
7

SYNOPSIS

9       #include <sys/types.h>
10       #include "lfc_api.h"
11
12       int  lfc_getlinks  (const char *path, const char *guid, int *nbentries,
13       struct lfc_linkinfo **linkinfos)
14

DESCRIPTION

16       lfc_getlinks gets the link entries associated with a given  file.   The
17       first  entry  in  the  list  is  the  actual file name, while the other
18       entries are the symbolic links pointing at this file.
19
20       The file can be specified by path name or by guid.  If both are  given,
21       they must point at the same file.
22
23       path   specifies  the  logical  pathname  relative  to  the current LFC
24              directory or the full LFC pathname.
25
26       guid   specifies the Grid Unique IDentifier.
27
28       nbentries
29              will be set to the number of entries in the array of link infos.
30
31       link_entries
32              will be set to the address of an array  of  lfc_linkinfo  struc‐
33              tures  allocated by the API. The client application is responsi‐
34              ble for freeing the array when not needed anymore.
35
36       struct lfc_linkinfo {
37            char      path[CA_MAXPATHLEN+1];
38       };
39

RETURN VALUE

41       This routine returns 0 if the operation was successful  or  -1  if  the
42       operation failed. In the latter case, serrno is set appropriately.
43

ERRORS

45       ENOENT       The named file does not exist.
46
47       EACCES       Search  permission  is  denied  on a component of the path
48                    prefix.
49
50       ENOMEM       Memory could not be allocated for unmarshalling the reply.
51
52       EFAULT       path and guid are NULL pointers or nbentries or  linkinfos
53                    is a NULL pointer.
54
55       ENOTDIR      A component of path prefix is not a directory.
56
57       EINVAL       The  length of guid exceeds CA_MAXGUIDLEN or path and guid
58                    are both given and they point at a different file.
59
60       ENAMETOOLONG The length of path exceeds CA_MAXPATHLEN or the length  of
61                    a path component exceeds CA_MAXNAMELEN.
62
63       SENOSHOST    Host unknown.
64
65       SENOSSERV    Service unknown.
66
67       SECOMERR     Communication error.
68
69       ENSNACT      Name server is not running or is being shutdown.
70

SEE ALSO

72       Castor_limits(4), lfc_chdir(3)
73

AUTHOR

75       LCG Grid Deployment Team
76
77
78
79LFC                      $Date: 2006/04/26 10:12:35 $          LFC_GETLINKS(3)
Impressum