[1mDESCRIPTION[0m [1mdpns_registerfiles [22mregisters a list of files with their corresponding replica entry. If the lfn is already registered, the guid is optional and only the replica is added (after checking that filesize and possi- bly checksum match). If the lfn is not registered yet, the guid is mandatory for the LFC. The lfn and the replica get registered.

[4mnbfiles[0m specifies the number of files in the array [4mfiles[24m.

[4mfiles[24m is a pointer to an array of dpns_filereg structures provided by the application.

[4mnbstatuses[0m will be set to the number of replies in the array of statuses.

[4mstatuses[0m will be set to the address of an array of integer statuses allo- cated by the API. The client application is responsible for freeing the array when not needed anymore. Individual statuses are 0 if the operation was successful or set to the serrno value in case of error.

[1mRETURN VALUE[0m This routine returns 0 if the operation was successful or -1 if the operation failed. In the latter case, [1mserrno [22mis set appropriately.

[1mERRORS[0m [1mENOENT [22mA component of [4mlfn[24m prefix does not exist or [4mlfn[24m is a null pathname.

[1mE2BIG [22mRequest too large (max 1 MB).

[1mENOMEM [22mMemory could not be allocated for marshalling the request or unmarshalling the reply.

[1mEACCES [22mSearch permission is denied on a component of the [4mlfn[24m pre- fix or the file does not exist and write permission on the parent directory is denied or write permission on the file itself is denied.

[1mEFAULT [4m[22mfiles[24m, [4mnbstatuses[24m or [4mstatuses[24m is a NULL pointer.

[1mEEXIST [22mThe [4msfn[24m exists already.

[1mENOTDIR [22mA component of [4mlfn[24m prefix is not a directory.

[1mEISDIR [22mThe [4mlfn[24m exists already and is not a regular file.

[1mEINVAL [4m[22mnbfiles[24m is not strictly positive, the length of one of the [4mguids[24m exceeds [1mCA_MAXGUIDLEN [22mor the length of [4mserver[0m exceeds [1mCA_MAXHOSTNAMELEN [22mor lfn and guid are both given and they point at a different file.