mirror of
https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git
synced 2026-04-29 12:28:27 +02:00
4fce89252c
Remove externs, correct argument names and reformat declarations. Signed-off-by: David Howells <dhowells@redhat.com> cc: Steve French <sfrench@samba.org> cc: Paulo Alcantara <pc@manguebit.org> cc: Enzo Matsumiya <ematsumiya@suse.de> cc: linux-cifs@vger.kernel.org cc: linux-fsdevel@vger.kernel.org cc: linux-kernel@vger.kernel.org Acked-by: Enzo Matsumiya <ematsumiya@suse.de> Signed-off-by: Steve French <stfrench@microsoft.com>
38 lines
841 B
C
38 lines
841 B
C
/* SPDX-License-Identifier: LGPL-2.1 */
|
|
/*
|
|
* DNS Resolver upcall management for CIFS DFS
|
|
* Handles host name to IP address resolution
|
|
*
|
|
* Copyright (c) International Business Machines Corp., 2008
|
|
* Author(s): Steve French (sfrench@us.ibm.com)
|
|
*
|
|
*/
|
|
|
|
#ifndef _DNS_RESOLVE_H
|
|
#define _DNS_RESOLVE_H
|
|
|
|
#include <linux/net.h>
|
|
#include "cifsglob.h"
|
|
#include "cifsproto.h"
|
|
|
|
int dns_resolve_name(const char *dom, const char *name, size_t namelen,
|
|
struct sockaddr *ip_addr);
|
|
|
|
static inline int dns_resolve_unc(const char *dom, const char *unc,
|
|
struct sockaddr *ip_addr)
|
|
{
|
|
const char *name;
|
|
size_t namelen;
|
|
|
|
if (!unc || strlen(unc) < 3)
|
|
return -EINVAL;
|
|
|
|
extract_unc_hostname(unc, &name, &namelen);
|
|
if (!namelen)
|
|
return -EINVAL;
|
|
|
|
return dns_resolve_name(dom, name, namelen, ip_addr);
|
|
}
|
|
|
|
#endif /* _DNS_RESOLVE_H */
|