eui64.c (129957) | eui64.c (254700) |
---|---|
1/* 2 * Copyright 2004 The Aerospace Corporation. All rights reserved. 3 * 4 * Redistribution and use in source and binary forms, with or without 5 * modification, are permitted provided that the following conditions 6 * are met: 7 * 8 * 1. Redistributions of source code must retain the above copyright --- 54 unchanged lines hidden (view full) --- 63 * by Brooks Davis 64 * 65 * Written by Bill Paul <wpaul@ctr.columbia.edu> 66 * Center for Telecommunications Research 67 * Columbia University, New York City 68 */ 69 70#include <sys/cdefs.h> | 1/* 2 * Copyright 2004 The Aerospace Corporation. All rights reserved. 3 * 4 * Redistribution and use in source and binary forms, with or without 5 * modification, are permitted provided that the following conditions 6 * are met: 7 * 8 * 1. Redistributions of source code must retain the above copyright --- 54 unchanged lines hidden (view full) --- 63 * by Brooks Davis 64 * 65 * Written by Bill Paul <wpaul@ctr.columbia.edu> 66 * Center for Telecommunications Research 67 * Columbia University, New York City 68 */ 69 70#include <sys/cdefs.h> |
71__FBSDID("$FreeBSD: head/lib/libc/net/eui64.c 129957 2004-06-01 19:30:13Z brooks $"); | 71__FBSDID("$FreeBSD: head/lib/libc/net/eui64.c 254700 2013-08-23 13:59:47Z jilles $"); |
72 73#include <stdio.h> 74#include <paths.h> 75#include <sys/types.h> 76#include <sys/eui64.h> 77#include <string.h> 78#include <stdlib.h> 79#include <sys/param.h> --- 142 unchanged lines hidden (view full) --- 222 struct eui64 local_eui64; 223 char local_host[MAXHOSTNAMELEN]; 224#ifdef YP 225 char *result; 226 int resultlen; 227 char eui64_a[24]; 228 char *yp_domain; 229#endif | 72 73#include <stdio.h> 74#include <paths.h> 75#include <sys/types.h> 76#include <sys/eui64.h> 77#include <string.h> 78#include <stdlib.h> 79#include <sys/param.h> --- 142 unchanged lines hidden (view full) --- 222 struct eui64 local_eui64; 223 char local_host[MAXHOSTNAMELEN]; 224#ifdef YP 225 char *result; 226 int resultlen; 227 char eui64_a[24]; 228 char *yp_domain; 229#endif |
230 if ((fp = fopen(_PATH_EUI64, "r")) == NULL) | 230 if ((fp = fopen(_PATH_EUI64, "re")) == NULL) |
231 return (1); 232 233 while (fgets(buf,BUFSIZ,fp)) { 234 if (buf[0] == '#') 235 continue; 236#ifdef YP 237 if (buf[0] == '+') { 238 if (yp_get_default_domain(&yp_domain)) --- 33 unchanged lines hidden (view full) --- 272 char buf[BUFSIZ + 2]; 273 struct eui64 local_eui64; 274 char local_host[MAXHOSTNAMELEN]; 275#ifdef YP 276 char *result; 277 int resultlen; 278 char *yp_domain; 279#endif | 231 return (1); 232 233 while (fgets(buf,BUFSIZ,fp)) { 234 if (buf[0] == '#') 235 continue; 236#ifdef YP 237 if (buf[0] == '+') { 238 if (yp_get_default_domain(&yp_domain)) --- 33 unchanged lines hidden (view full) --- 272 char buf[BUFSIZ + 2]; 273 struct eui64 local_eui64; 274 char local_host[MAXHOSTNAMELEN]; 275#ifdef YP 276 char *result; 277 int resultlen; 278 char *yp_domain; 279#endif |
280 if ((fp = fopen(_PATH_EUI64, "r")) == NULL) | 280 if ((fp = fopen(_PATH_EUI64, "re")) == NULL) |
281 return (1); 282 283 while (fgets(buf,BUFSIZ,fp)) { 284 if (buf[0] == '#') 285 continue; 286#ifdef YP 287 if (buf[0] == '+') { 288 if (yp_get_default_domain(&yp_domain)) --- 23 unchanged lines hidden --- | 281 return (1); 282 283 while (fgets(buf,BUFSIZ,fp)) { 284 if (buf[0] == '#') 285 continue; 286#ifdef YP 287 if (buf[0] == '+') { 288 if (yp_get_default_domain(&yp_domain)) --- 23 unchanged lines hidden --- |