/********************************************************************* * * Filename: irda.c * Version: 0.2 * Description: A second attempt to make ifconfig understand IrDA * Status: Experimental. * Author: Dag Brattli * Created at: Wed Apr 21 09:03:09 1999 * Modified at: Wed Apr 21 09:17:05 1999 * Modified by: Dag Brattli * Modified at: Wed May 1 11:51:44 CEST 2002 * Modified by: Christoph Bartelmus * * This program is free software; you can redistribute it and/or * modify it under the terms of the GNU General Public License as * published by the Free Software Foundation; either version 2 of * the License, or (at your option) any later version. * * This program is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. * * You should have received a copy of the GNU General Public License * along with this program; if not, write to the Free Software * Foundation, Inc., 59 Temple Place, Suite 330, Boston, * MA 02111-1307 USA * ********************************************************************/ #include "config.h" #if HAVE_AFIRDA || HAVE_HWIRDA #include #include #include #include #include #include #include #include #include #include #include #include #include "net-support.h" #include "pathnames.h" #include "intl.h" #include "util.h" /* Probably not a good idea to include */ #ifndef ARPHRD_IRDA #define ARPHRD_IRDA 783 #endif /* * Function irda_print (ptr) * * Print hardware address of interface * */ static const char *irda_print(const char *ptr) { static char buff[12]; snprintf(buff, 12, "%02x:%02x:%02x:%02x", ptr[3], ptr[2], ptr[1], ptr[0]); return (buff); } struct hwtype irda_hwtype = { "irda", NULL, ARPHRD_IRDA, 2, irda_print, NULL, NULL, 0 }; #endif /* HAVE_xxIRDA */