Fix the rechallenge behaviour. Previously, once it sent a rechallenge,
[mpls-ppp.git] / pppd / eui64.c
blobd025eff4c1e2742d8dbf86ee205dc53ff059ab6c
1 /*
2 * eui64.c - EUI64 routines for IPv6CP.
4 * Copyright (c) 1999 Tommi Komulainen. All rights reserved.
6 * Redistribution and use in source and binary forms, with or without
7 * modification, are permitted provided that the following conditions
8 * are met:
10 * 1. Redistributions of source code must retain the above copyright
11 * notice, this list of conditions and the following disclaimer.
13 * 2. Redistributions in binary form must reproduce the above copyright
14 * notice, this list of conditions and the following disclaimer in
15 * the documentation and/or other materials provided with the
16 * distribution.
18 * 3. The name(s) of the authors of this software must not be used to
19 * endorse or promote products derived from this software without
20 * prior written permission.
22 * 4. Redistributions of any form whatsoever must retain the following
23 * acknowledgment:
24 * "This product includes software developed by Tommi Komulainen
25 * <Tommi.Komulainen@iki.fi>".
27 * THE AUTHORS OF THIS SOFTWARE DISCLAIM ALL WARRANTIES WITH REGARD TO
28 * THIS SOFTWARE, INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY
29 * AND FITNESS, IN NO EVENT SHALL THE AUTHORS BE LIABLE FOR ANY
30 * SPECIAL, INDIRECT OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES
31 * WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN
32 * AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING
33 * OUT OF OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
35 * $Id: eui64.c,v 1.6 2002/12/04 23:03:32 paulus Exp $
38 #define RCSID "$Id: eui64.c,v 1.6 2002/12/04 23:03:32 paulus Exp $"
40 #include "pppd.h"
42 static const char rcsid[] = RCSID;
45 * eui64_ntoa - Make an ascii representation of an interface identifier
47 char *
48 eui64_ntoa(e)
49 eui64_t e;
51 static char buf[32];
53 snprintf(buf, 32, "%02x%02x:%02x%02x:%02x%02x:%02x%02x",
54 e.e8[0], e.e8[1], e.e8[2], e.e8[3],
55 e.e8[4], e.e8[5], e.e8[6], e.e8[7]);
56 return buf;