summaryrefslogtreecommitdiff
path: root/nss/ethers.c
diff options
context:
space:
mode:
authorArthur de Jong <arthur@arthurdejong.org>2012-12-23 19:56:29 +0000
committerArthur de Jong <arthur@arthurdejong.org>2012-12-23 19:56:29 +0000
commitade4c9a0c0e9d251c9d1ffee3dcf4abfb007a6b6 (patch)
tree79e69076dda3b7a918eef47b85c53084c282c069 /nss/ethers.c
parenta7b5935ec4b09e75ac5bf6de73ec80984d54cd68 (diff)
merge NSS_BYNAME and NSS_BYINT32 into NSS_BYGEN and rename to NSS_GETONE
git-svn-id: http://arthurdejong.org/svn/nss-pam-ldapd/nss-pam-ldapd@1876 ef36b2f9-881f-0410-afb5-c4e39611909c
Diffstat (limited to 'nss/ethers.c')
-rw-r--r--nss/ethers.c19
1 files changed, 10 insertions, 9 deletions
diff --git a/nss/ethers.c b/nss/ethers.c
index 7369e88..c374975 100644
--- a/nss/ethers.c
+++ b/nss/ethers.c
@@ -49,7 +49,8 @@ nss_status_t _nss_ldap_gethostton_r(const char *name,
struct etherent *result, char *buffer,
size_t buflen, int *errnop)
{
- NSS_BYNAME(NSLCD_ACTION_ETHER_BYNAME, name,
+ NSS_GETONE(NSLCD_ACTION_ETHER_BYNAME,
+ WRITE_STRING(fp, name),
read_etherent(fp, result, buffer, buflen, errnop));
}
@@ -58,9 +59,9 @@ nss_status_t _nss_ldap_getntohost_r(const struct ether_addr *addr,
struct etherent *result, char *buffer,
size_t buflen, int *errnop)
{
- NSS_BYGEN(NSLCD_ACTION_ETHER_BYETHER,
- WRITE(fp, addr, sizeof(uint8_t[6])),
- read_etherent(fp, result, buffer, buflen, errnop));
+ NSS_GETONE(NSLCD_ACTION_ETHER_BYETHER,
+ WRITE(fp, addr, sizeof(uint8_t[6])),
+ read_etherent(fp, result, buffer, buflen, errnop));
}
/* thread-local file pointer to an ongoing request */
@@ -153,8 +154,8 @@ static nss_status_t read_result(TFILE *fp, nss_XbyY_args_t *args, int wantname)
/* map a hostname to the corresponding ethernet address */
static nss_status_t ethers_gethostton(nss_backend_t UNUSED(*be), void *args)
{
- NSS_BYNAME(NSLCD_ACTION_ETHER_BYNAME,
- NSS_ARGS(args)->key.name,
+ NSS_GETONE(NSLCD_ACTION_ETHER_BYNAME,
+ WRITE_STRING(fp, NSS_ARGS(args)->key.name),
read_result(fp, args, 0));
}
@@ -162,9 +163,9 @@ static nss_status_t ethers_gethostton(nss_backend_t UNUSED(*be), void *args)
static nss_status_t ethers_getntohost(nss_backend_t UNUSED(*be), void *args)
{
struct ether_addr *addr = (struct ether_addr *)(NSS_ARGS(args)->key.ether);
- NSS_BYGEN(NSLCD_ACTION_ETHER_BYETHER,
- WRITE(fp, addr, sizeof(uint8_t[6])),
- read_result(fp, args, 1));
+ NSS_GETONE(NSLCD_ACTION_ETHER_BYETHER,
+ WRITE(fp, addr, sizeof(uint8_t[6])),
+ read_result(fp, args, 1));
}
static nss_backend_op_t ethers_ops[] = {