/*********************************************************************
*
* Filename: irda.c
- * Version: 0.1
- * Description: A first attempt to make ifconfig understand IrDA
+ * Version: 0.2
+ * Description: A second attempt to make ifconfig understand IrDA
* Status: Experimental.
* Author: Dag Brattli <dagb@cs.uit.no>
* Created at: Wed Apr 21 09:03:09 1999
* Modified at: Wed Apr 21 09:17:05 1999
* Modified by: Dag Brattli <dagb@cs.uit.no>
+ * Modified at: Wed May 1 11:51:44 CEST 2002
+ * Modified by: Christoph Bartelmus <christoph@bartelmus.de>
*
* This program is free software; you can redistribute it and/or
* modify it under the terms of the GNU General Public License as
* Print hardware address of interface
*
*/
-static char *irda_print(unsigned char *ptr)
+static const char *irda_print(const char *ptr)
{
- static char buff[8];
+ static char buff[12];
- sprintf(&buff[strlen(buff)], "%02x:%02x:%02x:%02x", ptr[3], ptr[2],
+ snprintf(buff, 12, "%02x:%02x:%02x:%02x", ptr[3], ptr[2],
ptr[1], ptr[0]);
return (buff);
}
-/*
- * Function irda_sprint (sap)
- *
- * Print IrDA socket address
- *
- */
-static char *irda_sprint(struct sockaddr *sap)
-{
- /* NOP */
- return NULL;
-}
-
struct hwtype irda_hwtype =
{
"irda", NULL, ARPHRD_IRDA, 2,
- irda_print, irda_sprint, NULL, NULL
+ irda_print, NULL, NULL, 0
};
#endif /* HAVE_xxIRDA */