mirror of
https://github.com/opnsense/src.git
synced 2026-02-19 02:30:08 -05:00
Add missing IEEE1394 support dropped during merge from NetBSD.
This commit is contained in:
parent
24de8d2d59
commit
823e5e0ebf
1 changed files with 11 additions and 0 deletions
|
|
@ -52,6 +52,7 @@ __FBSDID("$FreeBSD$");
|
|||
#include <net/if.h>
|
||||
#include <net/if_dl.h>
|
||||
#include <net/if_types.h>
|
||||
#include <net/firewire.h>
|
||||
#include <netinet/in.h>
|
||||
#include <arpa/inet.h>
|
||||
#include <arpa/nameser.h>
|
||||
|
|
@ -385,6 +386,7 @@ getnameinfo_link(const struct sockaddr *sa, socklen_t salen,
|
|||
{
|
||||
const struct sockaddr_dl *sdl =
|
||||
(const struct sockaddr_dl *)(const void *)sa;
|
||||
const struct fw_hwaddr *iha;
|
||||
int n;
|
||||
|
||||
if (serv != NULL && servlen > 0)
|
||||
|
|
@ -400,6 +402,15 @@ getnameinfo_link(const struct sockaddr *sa, socklen_t salen,
|
|||
}
|
||||
|
||||
switch (sdl->sdl_type) {
|
||||
case IFT_IEEE1394:
|
||||
if (sdl->sdl_alen < sizeof(iha->sender_unique_ID_hi) +
|
||||
sizeof(iha->sender_unique_ID_lo))
|
||||
return EAI_FAMILY;
|
||||
iha = (const struct fw_hwaddr *)(const void *)LLADDR(sdl);
|
||||
return hexname((const u_int8_t *)&iha->sender_unique_ID_hi,
|
||||
sizeof(iha->sender_unique_ID_hi) +
|
||||
sizeof(iha->sender_unique_ID_lo),
|
||||
host, hostlen);
|
||||
/*
|
||||
* The following have zero-length addresses.
|
||||
* IFT_ATM (net/if_atmsubr.c)
|
||||
|
|
|
|||
Loading…
Reference in a new issue