/*
* CDDL HEADER START
*
* The contents of this file are subject to the terms of the
* Common Development and Distribution License (the "License").
* You may not use this file except in compliance with the License.
*
* You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE
* See the License for the specific language governing permissions
* and limitations under the License.
*
* When distributing Covered Code, include this CDDL HEADER in each
* file and include the License file at usr/src/OPENSOLARIS.LICENSE.
* If applicable, add the following below this CDDL HEADER, with the
* fields enclosed by brackets "[]" replaced with your own identifying
* information: Portions Copyright [yyyy] [name of copyright owner]
*
* CDDL HEADER END
*/
/*
*
* files/getservent.c -- "files" backend for nsswitch "services" database
*/
#include <netdb.h>
#include "files_common.h"
#include <inttypes.h>
#include <strings.h>
#include <ctype.h>
#include <stdlib.h>
static int
{
int name_match = 0;
/* compare name */
keyp++;
linep++;
}
return (1);
else
name_match = 1;
}
/* skip remainder of the name, if any */
linep++;
/* skip the delimiting spaces */
linep++;
/* skip port number */
linep++;
return (0);
linep++;
/* skip protocol */
linep++;
} else {
/* compare protocol */
keyp++;
linep++;
}
/* no protocol match */
return (0);
/* protocol and name match, return */
if (name_match)
return (1);
/* protocol match but name yet to be matched, so continue */
}
/* compare with the aliases */
/* skip the delimiting spaces */
linep++;
/* compare with the alias name */
keyp++;
linep++;
}
return (1);
/* skip remainder of the alias name, if any */
linep++;
}
return (0);
}
static nss_status_t
void *a;
{
}
static int
{
/* skip name */
linep++;
/* skip the delimiting spaces */
linep++;
/* compare port num */
linep++;
return (0);
return (0);
if (*numend != '\0')
return (0);
return (1);
} else
return (0);
/* compare protocol */
linep++;
keyp++;
linep++;
}
}
static nss_status_t
void *a;
{
}
};
/*ARGSUSED*/
{
return (_nss_files_constr(serv_ops,
NULL, 0));
}