Marco Zecchini
/
Example_RTOS
Rtos API example
Embed:
(wiki syntax)
Show/hide line numbers
lwip_eui64.c
00001 /* 00002 * eui64.c - EUI64 routines for IPv6CP. 00003 * 00004 * Copyright (c) 1999 Tommi Komulainen. All rights reserved. 00005 * 00006 * Redistribution and use in source and binary forms, with or without 00007 * modification, are permitted provided that the following conditions 00008 * are met: 00009 * 00010 * 1. Redistributions of source code must retain the above copyright 00011 * notice, this list of conditions and the following disclaimer. 00012 * 00013 * 2. Redistributions in binary form must reproduce the above copyright 00014 * notice, this list of conditions and the following disclaimer in 00015 * the documentation and/or other materials provided with the 00016 * distribution. 00017 * 00018 * 3. The name(s) of the authors of this software must not be used to 00019 * endorse or promote products derived from this software without 00020 * prior written permission. 00021 * 00022 * 4. Redistributions of any form whatsoever must retain the following 00023 * acknowledgment: 00024 * "This product includes software developed by Tommi Komulainen 00025 * <Tommi.Komulainen@iki.fi>". 00026 * 00027 * THE AUTHORS OF THIS SOFTWARE DISCLAIM ALL WARRANTIES WITH REGARD TO 00028 * THIS SOFTWARE, INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY 00029 * AND FITNESS, IN NO EVENT SHALL THE AUTHORS BE LIABLE FOR ANY 00030 * SPECIAL, INDIRECT OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES 00031 * WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN 00032 * AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING 00033 * OUT OF OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE. 00034 * 00035 * $Id: eui64.c,v 1.6 2002/12/04 23:03:32 paulus Exp $ 00036 */ 00037 00038 #include "netif/ppp/ppp_opts.h" 00039 #if PPP_SUPPORT && PPP_IPV6_SUPPORT /* don't build if not configured for use in lwipopts.h */ 00040 00041 #include "netif/ppp/ppp_impl.h" 00042 #include "netif/ppp/eui64.h" 00043 00044 /* 00045 * eui64_ntoa - Make an ascii representation of an interface identifier 00046 */ 00047 char *eui64_ntoa(eui64_t e) { 00048 static char buf[20]; 00049 00050 sprintf(buf, "%02x%02x:%02x%02x:%02x%02x:%02x%02x", 00051 e.e8[0], e.e8[1], e.e8[2], e.e8[3], 00052 e.e8[4], e.e8[5], e.e8[6], e.e8[7]); 00053 return buf; 00054 } 00055 00056 #endif /* PPP_SUPPORT && PPP_IPV6_SUPPORT */
Generated on Sun Jul 17 2022 08:25:24 by 1.7.2