2 Copyright (C) 2010 by Ronnie Sahlberg <ronniesahlberg@gmail.com>
4 This program is free software; you can redistribute it and/or modify
5 it under the terms of the GNU Lesser General Public License as published by
6 the Free Software Foundation; either version 2.1 of the License, or
7 (at your option) any later version.
9 This program is distributed in the hope that it will be useful,
10 but WITHOUT ANY WARRANTY; without even the implied warranty of
11 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
12 GNU Lesser General Public License for more details.
14 You should have received a copy of the GNU Lesser General Public License
15 along with this program; if not, see <http://www.gnu.org/licenses/>.
18 * This is the highlevel interface to access NFS resources using a posix-like interface
26 #define EXTERN __declspec( dllexport )
55 * Used for interfacing the async version of the api into an external eventsystem
57 EXTERN
int nfs_get_fd(struct nfs_context
*nfs
);
58 EXTERN
int nfs_which_events(struct nfs_context
*nfs
);
59 EXTERN
int nfs_service(struct nfs_context
*nfs
, int revents
);
60 EXTERN
int nfs_queue_length(struct nfs_context
*nfs
);
63 * Used if you need different credentials than the default for the current user.
66 EXTERN
void nfs_set_auth(struct nfs_context
*nfs
, struct AUTH
*auth
);
70 * When an operation failed, this function can extract a detailed error string.
72 EXTERN
char *nfs_get_error(struct nfs_context
*nfs
);
76 * Callback for all ASYNC nfs functions
78 typedef void (*nfs_cb
)(int err
, struct nfs_context
*nfs
, void *data
, void *private_data
);
81 * Callback for all ASYNC rpc functions
83 typedef void (*rpc_cb
)(struct rpc_context
*rpc
, int status
, void *data
, void *private_data
);
91 * Create an NFS c, the context.
93 * NULL : Failed to create a context.
94 * *nfs : A pointer to an nfs context.
96 EXTERN
struct nfs_context
*nfs_init_context(void);
98 * Destroy an nfs context.
100 EXTERN
void nfs_destroy_context(struct nfs_context
*nfs
);
106 * Get the maximum supported READ3 size by the server
108 EXTERN
size_t nfs_get_readmax(struct nfs_context
*nfs
);
111 * Get the maximum supported WRITE3 size by the server
113 EXTERN
size_t nfs_get_writemax(struct nfs_context
*nfs
);
122 * 0 : The operation was initiated. Once the operation finishes, the callback will be invoked.
123 * <0 : An error occured when trying to set up the operation. The callback will not be invoked.
125 * When the callback is invoked, status indicates the result:
128 * -errno : An error occured.
129 * data is the error string.
131 EXTERN
int nfs_mount_async(struct nfs_context
*nfs
, const char *server
, const char *exportname
, nfs_cb cb
, void *private_data
);
135 * 0 : The operation was successfull.
136 * -errno : The command failed.
138 EXTERN
int nfs_mount(struct nfs_context
*nfs
, const char *server
, const char *exportname
);
147 * Async stat(<filename>)
149 * 0 : The operation was initiated. Once the operation finishes, the callback will be invoked.
150 * <0 : An error occured when trying to set up the operation. The callback will not be invoked.
152 * When the callback is invoked, status indicates the result:
154 * data is struct stat *
155 * -errno : An error occured.
156 * data is the error string.
159 EXTERN
int nfs_stat_async(struct nfs_context
*nfs
, const char *path
, nfs_cb cb
, void *private_data
);
161 * Sync stat(<filename>)
163 * 0 : The operation was successfull.
164 * -errno : The command failed.
166 EXTERN
int nfs_stat(struct nfs_context
*nfs
, const char *path
, struct stat
*st
);
173 * Async fstat(nfsfh *)
175 * 0 : The operation was initiated. Once the operation finishes, the callback will be invoked.
176 * <0 : An error occured when trying to set up the operation. The callback will not be invoked.
178 * When the callback is invoked, status indicates the result:
180 * data is struct stat *
181 * -errno : An error occured.
182 * data is the error string.
184 EXTERN
int nfs_fstat_async(struct nfs_context
*nfs
, struct nfsfh
*nfsfh
, nfs_cb cb
, void *private_data
);
186 * Sync fstat(nfsfh *)
188 * 0 : The operation was successfull.
189 * -errno : The command failed.
191 EXTERN
int nfs_fstat(struct nfs_context
*nfs
, struct nfsfh
*nfsfh
, struct stat
*st
);
199 * Async open(<filename>)
201 * mode is a combination of the flags : O_RDOLNY, O_WRONLY, O_RDWR , O_SYNC
204 * 0 : The operation was initiated. Once the operation finishes, the callback will be invoked.
205 * <0 : An error occured when trying to set up the operation. The callback will not be invoked.
207 * When the callback is invoked, status indicates the result:
209 * data is a struct *nfsfh;
210 * The nfsfh is close using nfs_close().
211 * -errno : An error occured.
212 * data is the error string.
214 EXTERN
int nfs_open_async(struct nfs_context
*nfs
, const char *path
, int mode
, nfs_cb cb
, void *private_data
);
216 * Sync stat(<filename>)
218 * 0 : The operation was successfull. *nfsfh is filled in.
219 * -errno : The command failed.
221 EXTERN
int nfs_open(struct nfs_context
*nfs
, const char *path
, int mode
, struct nfsfh
**nfsfh
);
233 * 0 : The operation was initiated. Once the operation finishes, the callback will be invoked.
234 * <0 : An error occured when trying to set up the operation. The callback will not be invoked.
236 * When the callback is invoked, status indicates the result:
239 * -errno : An error occured.
240 * data is the error string.
242 EXTERN
int nfs_close_async(struct nfs_context
*nfs
, struct nfsfh
*nfsfh
, nfs_cb cb
, void *private_data
);
246 * 0 : The operation was successfull.
247 * -errno : The command failed.
249 EXTERN
int nfs_close(struct nfs_context
*nfs
, struct nfsfh
*nfsfh
);
259 * 0 : The operation was initiated. Once the operation finishes, the callback will be invoked.
260 * <0 : An error occured when trying to set up the operation. The callback will not be invoked.
262 * When the callback is invoked, status indicates the result:
264 * status is numer of bytes read.
265 * data is a pointer to the returned data.
266 * -errno : An error occured.
267 * data is the error string.
269 EXTERN
int nfs_pread_async(struct nfs_context
*nfs
, struct nfsfh
*nfsfh
, off_t offset
, size_t count
, nfs_cb cb
, void *private_data
);
273 * >=0 : numer of bytes read.
274 * -errno : An error occured.
276 EXTERN
int nfs_pread(struct nfs_context
*nfs
, struct nfsfh
*nfsfh
, off_t offset
, size_t count
, char *buf
);
287 * 0 : The operation was initiated. Once the operation finishes, the callback will be invoked.
288 * <0 : An error occured when trying to set up the operation. The callback will not be invoked.
290 * When the callback is invoked, status indicates the result:
292 * status is numer of bytes read.
293 * data is a pointer to the returned data.
294 * -errno : An error occured.
295 * data is the error string.
297 EXTERN
int nfs_read_async(struct nfs_context
*nfs
, struct nfsfh
*nfsfh
, size_t count
, nfs_cb cb
, void *private_data
);
301 * >=0 : numer of bytes read.
302 * -errno : An error occured.
304 EXTERN
int nfs_read(struct nfs_context
*nfs
, struct nfsfh
*nfsfh
, size_t count
, char *buf
);
316 * 0 : The operation was initiated. Once the operation finishes, the callback will be invoked.
317 * <0 : An error occured when trying to set up the operation. The callback will not be invoked.
319 * When the callback is invoked, status indicates the result:
321 * status is numer of bytes written.
322 * -errno : An error occured.
323 * data is the error string.
325 EXTERN
int nfs_pwrite_async(struct nfs_context
*nfs
, struct nfsfh
*nfsfh
, off_t offset
, size_t count
, char *buf
, nfs_cb cb
, void *private_data
);
329 * >=0 : numer of bytes written.
330 * -errno : An error occured.
332 EXTERN
int nfs_pwrite(struct nfs_context
*nfs
, struct nfsfh
*nfsfh
, off_t offset
, size_t count
, char *buf
);
342 * 0 : The operation was initiated. Once the operation finishes, the callback will be invoked.
343 * <0 : An error occured when trying to set up the operation. The callback will not be invoked.
345 * When the callback is invoked, status indicates the result:
347 * status is numer of bytes written.
348 * -errno : An error occured.
349 * data is the error string.
351 EXTERN
int nfs_write_async(struct nfs_context
*nfs
, struct nfsfh
*nfsfh
, size_t count
, char *buf
, nfs_cb cb
, void *private_data
);
355 * >=0 : numer of bytes written.
356 * -errno : An error occured.
358 EXTERN
int nfs_write(struct nfs_context
*nfs
, struct nfsfh
*nfsfh
, size_t count
, char *buf
);
368 * 0 : The operation was initiated. Once the operation finishes, the callback will be invoked.
369 * <0 : An error occured when trying to set up the operation. The callback will not be invoked.
371 * When the callback is invoked, status indicates the result:
373 * data is off_t * for the current position.
374 * -errno : An error occured.
375 * data is the error string.
377 EXTERN
int nfs_lseek_async(struct nfs_context
*nfs
, struct nfsfh
*nfsfh
, off_t offset
, int whence
, nfs_cb cb
, void *private_data
);
381 * >=0 : numer of bytes read.
382 * -errno : An error occured.
384 EXTERN
int nfs_lseek(struct nfs_context
*nfs
, struct nfsfh
*nfsfh
, off_t offset
, int whence
, off_t
*current_offset
);
394 * 0 : The operation was initiated. Once the operation finishes, the callback will be invoked.
395 * <0 : An error occured when trying to set up the operation. The callback will not be invoked.
397 * When the callback is invoked, status indicates the result:
399 * -errno : An error occured.
400 * data is the error string.
402 EXTERN
int nfs_fsync_async(struct nfs_context
*nfs
, struct nfsfh
*nfsfh
, nfs_cb cb
, void *private_data
);
407 * -errno : An error occured.
409 EXTERN
int nfs_fsync(struct nfs_context
*nfs
, struct nfsfh
*nfsfh
);
420 * 0 : The operation was initiated. Once the operation finishes, the callback will be invoked.
421 * <0 : An error occured when trying to set up the operation. The callback will not be invoked.
423 * When the callback is invoked, status indicates the result:
425 * -errno : An error occured.
426 * data is the error string.
428 EXTERN
int nfs_truncate_async(struct nfs_context
*nfs
, const char *path
, off_t length
, nfs_cb cb
, void *private_data
);
433 * -errno : An error occured.
435 EXTERN
int nfs_truncate(struct nfs_context
*nfs
, const char *path
, off_t length
);
446 * 0 : The operation was initiated. Once the operation finishes, the callback will be invoked.
447 * <0 : An error occured when trying to set up the operation. The callback will not be invoked.
449 * When the callback is invoked, status indicates the result:
451 * -errno : An error occured.
452 * data is the error string.
454 EXTERN
int nfs_ftruncate_async(struct nfs_context
*nfs
, struct nfsfh
*nfsfh
, off_t length
, nfs_cb cb
, void *private_data
);
459 * -errno : An error occured.
461 EXTERN
int nfs_ftruncate(struct nfs_context
*nfs
, struct nfsfh
*nfsfh
, off_t length
);
475 * 0 : The operation was initiated. Once the operation finishes, the callback will be invoked.
476 * <0 : An error occured when trying to set up the operation. The callback will not be invoked.
478 * When the callback is invoked, status indicates the result:
480 * -errno : An error occured.
481 * data is the error string.
483 EXTERN
int nfs_mkdir_async(struct nfs_context
*nfs
, const char *path
, nfs_cb cb
, void *private_data
);
488 * -errno : An error occured.
490 EXTERN
int nfs_mkdir(struct nfs_context
*nfs
, const char *path
);
501 * 0 : The operation was initiated. Once the operation finishes, the callback will be invoked.
502 * <0 : An error occured when trying to set up the operation. The callback will not be invoked.
504 * When the callback is invoked, status indicates the result:
506 * -errno : An error occured.
507 * data is the error string.
509 EXTERN
int nfs_rmdir_async(struct nfs_context
*nfs
, const char *path
, nfs_cb cb
, void *private_data
);
514 * -errno : An error occured.
516 EXTERN
int nfs_rmdir(struct nfs_context
*nfs
, const char *path
);
528 * 0 : The operation was initiated. Once the operation finishes, the callback will be invoked.
529 * <0 : An error occured when trying to set up the operation. The callback will not be invoked.
531 * When the callback is invoked, status indicates the result:
533 * data is a struct *nfsfh;
534 * -errno : An error occured.
535 * data is the error string.
537 EXTERN
int nfs_creat_async(struct nfs_context
*nfs
, const char *path
, int mode
, nfs_cb cb
, void *private_data
);
542 * -errno : An error occured.
544 EXTERN
int nfs_creat(struct nfs_context
*nfs
, const char *path
, int mode
, struct nfsfh
**nfsfh
);
557 * 0 : The operation was initiated. Once the operation finishes, the callback will be invoked.
558 * <0 : An error occured when trying to set up the operation. The callback will not be invoked.
560 * When the callback is invoked, status indicates the result:
563 * -errno : An error occured.
564 * data is the error string.
566 EXTERN
int nfs_unlink_async(struct nfs_context
*nfs
, const char *path
, nfs_cb cb
, void *private_data
);
571 * -errno : An error occured.
573 EXTERN
int nfs_unlink(struct nfs_context
*nfs
, const char *path
);
586 * 0 : The operation was initiated. Once the operation finishes, the callback will be invoked.
587 * <0 : An error occured when trying to set up the operation. The callback will not be invoked.
589 * When struct nfsdir * is returned, this resource is closed/freed by calling nfs_closedir()
591 * When the callback is invoked, status indicates the result:
593 * data is struct nfsdir *
594 * -errno : An error occured.
595 * data is the error string.
597 EXTERN
int nfs_opendir_async(struct nfs_context
*nfs
, const char *path
, nfs_cb cb
, void *private_data
);
602 * -errno : An error occured.
604 EXTERN
int nfs_opendir(struct nfs_context
*nfs
, const char *path
, struct nfsdir
**nfsdir
);
612 struct nfsdirent
*next
;
616 /* some extra fields we get for free through the READDIRPLUS3 call. You need libnfs-raw-nfs.h for these */
617 uint32_t type
; /* NF3REG, NF3DIR, NF3BLK, ... */
620 struct timeval atime
;
621 struct timeval mtime
;
622 struct timeval ctime
;
625 * nfs_readdir() never blocks, so no special sync/async versions are available
627 EXTERN
struct nfsdirent
*nfs_readdir(struct nfs_context
*nfs
, struct nfsdir
*nfsdir
);
635 * nfs_closedir() never blocks, so no special sync/async versions are available
637 EXTERN
void nfs_closedir(struct nfs_context
*nfs
, struct nfsdir
*nfsdir
);
645 * Async statvfs(<dirname>)
647 * 0 : The operation was initiated. Once the operation finishes, the callback will be invoked.
648 * <0 : An error occured when trying to set up the operation. The callback will not be invoked.
650 * When the callback is invoked, status indicates the result:
652 * data is struct statvfs *
653 * -errno : An error occured.
654 * data is the error string.
657 EXTERN
int nfs_statvfs_async(struct nfs_context
*nfs
, const char *path
, nfs_cb cb
, void *private_data
);
659 * Sync statvfs(<dirname>)
661 * 0 : The operation was successfull.
662 * -errno : The command failed.
664 EXTERN
int nfs_statvfs(struct nfs_context
*nfs
, const char *path
, struct statvfs
*svfs
);
671 * Async readlink(<name>)
673 * 0 : The operation was initiated. Once the operation finishes, the callback will be invoked.
674 * <0 : An error occured when trying to set up the operation. The callback will not be invoked.
676 * When the callback is invoked, status indicates the result:
679 * data is only valid during the callback and is automatically freed when the callback returns.
680 * -errno : An error occured.
681 * data is the error string.
684 EXTERN
int nfs_readlink_async(struct nfs_context
*nfs
, const char *path
, nfs_cb cb
, void *private_data
);
686 * Sync readlink(<name>)
688 * 0 : The operation was successfull.
689 * -errno : The command failed.
691 EXTERN
int nfs_readlink(struct nfs_context
*nfs
, const char *path
, char *buf
, int bufsize
);
699 * Async chmod(<name>)
701 * 0 : The operation was initiated. Once the operation finishes, the callback will be invoked.
702 * <0 : An error occured when trying to set up the operation. The callback will not be invoked.
704 * When the callback is invoked, status indicates the result:
707 * -errno : An error occured.
708 * data is the error string.
710 EXTERN
int nfs_chmod_async(struct nfs_context
*nfs
, const char *path
, int mode
, nfs_cb cb
, void *private_data
);
714 * 0 : The operation was successfull.
715 * -errno : The command failed.
717 EXTERN
int nfs_chmod(struct nfs_context
*nfs
, const char *path
, int mode
);
725 * Async fchmod(<handle>)
727 * 0 : The operation was initiated. Once the operation finishes, the callback will be invoked.
728 * <0 : An error occured when trying to set up the operation. The callback will not be invoked.
730 * When the callback is invoked, status indicates the result:
733 * -errno : An error occured.
734 * data is the error string.
736 EXTERN
int nfs_fchmod_async(struct nfs_context
*nfs
, struct nfsfh
*nfsfh
, int mode
, nfs_cb cb
, void *private_data
);
738 * Sync fchmod(<handle>)
740 * 0 : The operation was successfull.
741 * -errno : The command failed.
743 EXTERN
int nfs_fchmod(struct nfs_context
*nfs
, struct nfsfh
*nfsfh
, int mode
);
751 * Async chown(<name>)
753 * 0 : The operation was initiated. Once the operation finishes, the callback will be invoked.
754 * <0 : An error occured when trying to set up the operation. The callback will not be invoked.
756 * When the callback is invoked, status indicates the result:
759 * -errno : An error occured.
760 * data is the error string.
762 EXTERN
int nfs_chown_async(struct nfs_context
*nfs
, const char *path
, int uid
, int gid
, nfs_cb cb
, void *private_data
);
766 * 0 : The operation was successfull.
767 * -errno : The command failed.
769 EXTERN
int nfs_chown(struct nfs_context
*nfs
, const char *path
, int uid
, int gid
);
777 * Async fchown(<handle>)
779 * 0 : The operation was initiated. Once the operation finishes, the callback will be invoked.
780 * <0 : An error occured when trying to set up the operation. The callback will not be invoked.
782 * When the callback is invoked, status indicates the result:
785 * -errno : An error occured.
786 * data is the error string.
788 EXTERN
int nfs_fchown_async(struct nfs_context
*nfs
, struct nfsfh
*nfsfh
, int uid
, int gid
, nfs_cb cb
, void *private_data
);
790 * Sync fchown(<handle>)
792 * 0 : The operation was successfull.
793 * -errno : The command failed.
795 EXTERN
int nfs_fchown(struct nfs_context
*nfs
, struct nfsfh
*nfsfh
, int uid
, int gid
);
804 * Async utimes(<path>)
806 * 0 : The operation was initiated. Once the operation finishes, the callback will be invoked.
807 * <0 : An error occured when trying to set up the operation. The callback will not be invoked.
809 * When the callback is invoked, status indicates the result:
812 * -errno : An error occured.
813 * data is the error string.
815 EXTERN
int nfs_utimes_async(struct nfs_context
*nfs
, const char *path
, struct timeval
*times
, nfs_cb cb
, void *private_data
);
817 * Sync utimes(<path>)
819 * 0 : The operation was successfull.
820 * -errno : The command failed.
822 EXTERN
int nfs_utimes(struct nfs_context
*nfs
, const char *path
, struct timeval
*times
);
829 * Async utime(<path>)
831 * 0 : The operation was initiated. Once the operation finishes, the callback will be invoked.
832 * <0 : An error occured when trying to set up the operation. The callback will not be invoked.
834 * When the callback is invoked, status indicates the result:
837 * -errno : An error occured.
838 * data is the error string.
841 EXTERN
int nfs_utime_async(struct nfs_context
*nfs
, const char *path
, struct utimbuf
*times
, nfs_cb cb
, void *private_data
);
845 * 0 : The operation was successfull.
846 * -errno : The command failed.
848 EXTERN
int nfs_utime(struct nfs_context
*nfs
, const char *path
, struct utimbuf
*times
);
857 * Async access(<path>)
859 * 0 : The operation was initiated. Once the operation finishes, the callback will be invoked.
860 * <0 : An error occured when trying to set up the operation. The callback will not be invoked.
862 * When the callback is invoked, status indicates the result:
865 * -errno : An error occured.
866 * data is the error string.
868 EXTERN
int nfs_access_async(struct nfs_context
*nfs
, const char *path
, int mode
, nfs_cb cb
, void *private_data
);
870 * Sync access(<path>)
872 * 0 : The operation was successfull.
873 * -errno : The command failed.
875 EXTERN
int nfs_access(struct nfs_context
*nfs
, const char *path
, int mode
);
884 * Async symlink(<path>)
886 * 0 : The operation was initiated. Once the operation finishes, the callback will be invoked.
887 * <0 : An error occured when trying to set up the operation. The callback will not be invoked.
889 * When the callback is invoked, status indicates the result:
892 * -errno : An error occured.
893 * data is the error string.
895 EXTERN
int nfs_symlink_async(struct nfs_context
*nfs
, const char *oldpath
, const char *newpath
, nfs_cb cb
, void *private_data
);
897 * Sync symlink(<path>)
899 * 0 : The operation was successfull.
900 * -errno : The command failed.
902 EXTERN
int nfs_symlink(struct nfs_context
*nfs
, const char *oldpath
, const char *newpath
);
909 * Async rename(<oldpath>, <newpath>)
911 * 0 : The operation was initiated. Once the operation finishes, the callback will be invoked.
912 * <0 : An error occured when trying to set up the operation. The callback will not be invoked.
914 * When the callback is invoked, status indicates the result:
917 * -errno : An error occured.
918 * data is the error string.
920 EXTERN
int nfs_rename_async(struct nfs_context
*nfs
, const char *oldpath
, const char *newpath
, nfs_cb cb
, void *private_data
);
922 * Sync rename(<oldpath>, <newpath>)
924 * 0 : The operation was successfull.
925 * -errno : The command failed.
927 EXTERN
int nfs_rename(struct nfs_context
*nfs
, const char *oldpath
, const char *newpath
);
935 * Async link(<oldpath>, <newpath>)
937 * 0 : The operation was initiated. Once the operation finishes, the callback will be invoked.
938 * <0 : An error occured when trying to set up the operation. The callback will not be invoked.
940 * When the callback is invoked, status indicates the result:
943 * -errno : An error occured.
944 * data is the error string.
946 EXTERN
int nfs_link_async(struct nfs_context
*nfs
, const char *oldpath
, const char *newpath
, nfs_cb cb
, void *private_data
);
948 * Sync link(<oldpath>, <newpath>)
950 * 0 : The operation was successfull.
951 * -errno : The command failed.
953 EXTERN
int nfs_link(struct nfs_context
*nfs
, const char *oldpath
, const char *newpath
);
961 * NOTE: You must include 'libnfs-raw-mount.h' to get the definitions of the
962 * returned structures.
964 * This function will return the list of exports from an NFS server.
967 * 0 : The operation was initiated. Once the operation finishes, the callback will be invoked.
968 * <0 : An error occured when trying to set up the operation. The callback will not be invoked.
970 * When the callback is invoked, status indicates the result:
972 * data is a pointer to an exports pointer:
973 * exports export = *(exports *)data;
974 * -errno : An error occured.
975 * data is the error string.
977 EXTERN
int mount_getexports_async(struct rpc_context
*rpc
, const char *server
, rpc_cb cb
, void *private_data
);
979 * Sync getexports(<server>)
981 * NULL : something failed
982 * exports export : a linked list of exported directories
984 * returned data must be freed by calling mount_free_export_list(exportnode);
986 EXTERN
struct exportnode
*mount_getexports(const char *server
);
988 EXTERN
void mount_free_export_list(struct exportnode
*exports
);
991 //qqq replace later with lseek(cur, 0)
992 off_t
nfs_get_current_offset(struct nfsfh
*nfsfh
);
998 struct nfs_server_list
{
999 struct nfs_server_list
*next
;
1004 * Sync find_local_servers(<server>)
1005 * This function will probe all local networks for NFS server. This function will
1006 * block for one second while awaiting for all nfs servers to respond.
1009 * NULL : something failed
1011 * struct nfs_server_list : a linked list of all discovered servers
1013 * returned data must be freed by nfs_free_srvr_list(srv);
1015 struct nfs_server_list
*nfs_find_local_servers(void);
1016 void free_nfs_srvr_list(struct nfs_server_list
*srv
);