]> git.ozlabs.org Git - ppp.git/blob - pppd/eui64.c
Comments on 64-bitness and IPv6 on Sol 8
[ppp.git] / pppd / eui64.c
1 /*
2     eui64.c - EUI64 routines for IPv6CP.
3     Copyright (C) 1999  Tommi Komulainen <Tommi.Komulainen@iki.fi>
4
5     This program is free software; you can redistribute it and/or modify
6     it under the terms of the GNU General Public License as published by
7     the Free Software Foundation; either version 2 of the License, or
8     (at your option) any later version.
9
10     This program is distributed in the hope that it will be useful,
11     but WITHOUT ANY WARRANTY; without even the implied warranty of
12     MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
13     GNU General Public License for more details.
14
15     You should have received a copy of the GNU General Public License
16     along with this program; if not, write to the Free Software
17     Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
18
19
20     $Id: eui64.c,v 1.3 1999/08/25 04:15:51 paulus Exp $
21 */
22
23 #define RCSID   "$Id: eui64.c,v 1.3 1999/08/25 04:15:51 paulus Exp $"
24
25 #include "pppd.h"
26
27 static const char rcsid[] = RCSID;
28
29 /*
30  * eui64_ntoa - Make an ascii representation of an interface identifier
31  */
32 char *
33 eui64_ntoa(e)
34     eui64_t e;
35 {
36     static char buf[32];
37
38     snprintf(buf, 32, "%02x%02x:%02x%02x:%02x%02x:%02x%02x",
39              e.e8[0], e.e8[1], e.e8[2], e.e8[3], 
40              e.e8[4], e.e8[5], e.e8[6], e.e8[7]);
41     return buf;
42 }