.\" Copyright 2008, Linux Foundation, written by Michael Kerrisk
.\" <mtk.manpages@gmail.com>
.\"
+.\" %%%LICENSE_START(VERBATIM)
.\" Permission is granted to make and distribute verbatim copies of this
.\" manual provided the copyright notice and this permission notice are
.\" preserved on all copies.
.\"
.\" Formatted or processed versions of this manual, if unaccompanied by
.\" the source, must acknowledge the copyright and authors of this work.
+.\" %%%LICENSE_END
.\"
.TH GETSERVENT_R 3 2010-09-10 "GNU" "Linux Programmer's Manual"
.SH NAME
otherwise,
.I *result
is set to NULL.
-.SH "RETURN VALUE"
+.SH RETURN VALUE
On success, these functions return 0.
On error, they return one of the positive error numbers listed in errors.
Try again with a larger buffer
(and increased
.IR buflen ).
-.SH "CONFORMING TO"
+.SH CONFORMING TO
These functions are GNU extensions.
Functions with similar names exist on some other systems,
though typically with different calling signatures.
char **p;
if (argc < 3) {
- printf("Usage: %s port\-num proto-name [buflen]\\n", argv[0]);
+ printf("Usage: %s port\-num proto\-name [buflen]\\n", argv[0]);
exit(EXIT_FAILURE);
}
port = htons(atoi(argv[1]));
protop = (strcmp(argv[2], "null") == 0 ||
- strcmp(argv[2], "NULL") == 0) ? NULL : argv[2];
+ strcmp(argv[2], "NULL") == 0) ? NULL : argv[2];
buflen = 1024;
if (argc > 3)
exit(EXIT_SUCCESS);
}
.fi
-.SH "SEE ALSO"
+.SH SEE ALSO
.BR getservent (3),
.BR services (5)
+.SH COLOPHON
+This page is part of release 3.65 of the Linux
+.I man-pages
+project.
+A description of the project,
+and information about reporting bugs,
+can be found at
+\%http://www.kernel.org/doc/man\-pages/.