mirror of
https://git.kernel.org/pub/scm/network/iproute2/iproute2.git
synced 2026-01-27 14:34:22 +00:00
NETROM uses AX.25 addresses so this is a simple wrapper around ax25_ntop1. Signed-off-by: Ralf Baechle <ralf@linux-mips.org> Signed-off-by: David Ahern <dsahern@kernel.org>
24 lines
442 B
C
24 lines
442 B
C
/* SPDX-License-Identifier: GPL-2.0 */
|
|
|
|
#include <sys/socket.h>
|
|
#include <errno.h>
|
|
#include <linux/ax25.h>
|
|
|
|
#include "utils.h"
|
|
|
|
const char *ax25_ntop1(const ax25_address *src, char *dst, socklen_t size);
|
|
|
|
const char *netrom_ntop(int af, const void *addr, char *buf, socklen_t buflen)
|
|
{
|
|
switch (af) {
|
|
case AF_NETROM:
|
|
errno = 0;
|
|
return ax25_ntop1((ax25_address *)addr, buf, buflen);
|
|
|
|
default:
|
|
errno = EAFNOSUPPORT;
|
|
}
|
|
|
|
return NULL;
|
|
}
|