[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
AF_LINK and sockaddr_dl
From: |
Pino Toscano |
Subject: |
AF_LINK and sockaddr_dl |
Date: |
Wed, 20 Jun 2012 21:08:35 +0200 |
User-agent: |
KMail/1.13.7 (Linux/3.2.0-2-amd64; KDE/4.8.3; x86_64; ; ) |
Hi,
in glibc, our bits/socket.h defines PF_LINK/AF_LINK; these seem to be
BSD feature, associated with the struct sockaddr_dl (which we do not
have), provided by <if_dl.h>.
It is not that uncommon for packages checking content of sockaddr
structs to do code like:
#ifdef AF_INET
if (sa->sa_family == AF_INET) {
struct sockaddr_in *sa_in = (struct sockaddr_in *)sa;
...
}
#endif
...
#ifdef AF_LINK
if (sa->sa_family == AF_LINK) {
struct sockaddr_dl *sa_in = (struct sockaddr_dl *)sa;
...
}
#endif
Would a patch for glibc that #if 0/comments out the PF_LINK/AF_LINK
defines be the right solution?
--
Pino Toscano
signature.asc
Description: This is a digitally signed message part.
[Prev in Thread] |
Current Thread |
[Next in Thread] |
- AF_LINK and sockaddr_dl,
Pino Toscano <=