/* \summary: AppleTalk printer */
-#ifdef HAVE_CONFIG_H
#include <config.h>
-#endif
#include "netdissect-stdinc.h"
nd_uint16_t htype, ptype;
nd_uint8_t halen, palen;
nd_uint16_t op;
- nd_mac_addr hsaddr;
- uint8_t psaddr[4];
- nd_mac_addr hdaddr;
- uint8_t pdaddr[4];
+ nd_mac48 hsaddr;
+ nd_byte psaddr[4];
+ nd_mac48 hdaddr;
+ nd_byte pdaddr[4];
};
static void atp_print(netdissect_options *, const struct atATP *, u_int);
ND_TCHECK_SIZE(ap);
if (GET_BE_U_2(ap->htype) == 1 &&
GET_BE_U_2(ap->ptype) == ETHERTYPE_ATALK &&
- GET_U_1(ap->halen) == MAC_ADDR_LEN && GET_U_1(ap->palen) == 4)
+ GET_U_1(ap->halen) == MAC48_LEN && GET_U_1(ap->palen) == 4)
switch (GET_BE_U_2(ap->op)) {
case 1: /* request */
return;
case 2: /* response */
- ND_PRINT("reply %s is-at %s", AT(psaddr), GET_ETHERADDR_STRING(ap->hsaddr));
+ ND_PRINT("reply %s is-at %s", AT(psaddr), GET_MAC48_STRING(ap->hsaddr));
return;
case 3: /* probe (oy!) */
* The '& 0xff' below is needed for compilers that want to sign
* extend a u_char, which is the case with the Ultrix compiler.
* (gcc is smart enough to eliminate it, at least on the Sparc).
+ *
+ * FIXME: If this problem no longer exists, this workaround should be
+ * removed. Otherwise the problem should be consistently detected and
+ * handled, perhaps at build time.
*/
if ((bm + 1) & (bm & 0xff)) {
char c = '<';