From b5e1cf204bc5d8348ce16388e905882a1bc4bd42 Mon Sep 17 00:00:00 2001 From: Ken Raeburn Date: Wed, 5 May 2004 22:44:46 +0000 Subject: Rename header file foreachaddr.c to foreachaddr.h, now that it isn't mostly static functions to be compiled in. git-svn-id: svn://anonsvn.mit.edu/krb5/trunk@16314 dc483132-0cff-0310-8789-dd5450dbe970 --- src/include/ChangeLog | 1 + src/include/foreachaddr.c | 64 ----------------------------------------------- src/include/foreachaddr.h | 64 +++++++++++++++++++++++++++++++++++++++++++++++ 3 files changed, 65 insertions(+), 64 deletions(-) delete mode 100644 src/include/foreachaddr.c create mode 100644 src/include/foreachaddr.h (limited to 'src/include') diff --git a/src/include/ChangeLog b/src/include/ChangeLog index f503efacf8..e76c0feb1d 100644 --- a/src/include/ChangeLog +++ b/src/include/ChangeLog @@ -1,6 +1,7 @@ 2004-05-05 Ken Raeburn * foreachaddr.c: Implementation moved to lib/krb5/os/localaddr.c. + * foreachaddr.h: New file. (krb5int_foreach_localaddr): Declare. (foreach_localaddr): New macro. diff --git a/src/include/foreachaddr.c b/src/include/foreachaddr.c deleted file mode 100644 index 57591f596e..0000000000 --- a/src/include/foreachaddr.c +++ /dev/null @@ -1,64 +0,0 @@ -/* - * include/foreachaddr.c - * - * Copyright 1990,1991,2000,2001,2002,2004 by the Massachusetts Institute of Technology. - * All Rights Reserved. - * - * Export of this software from the United States of America may - * require a specific license from the United States Government. - * It is the responsibility of any person or organization contemplating - * export to obtain such a license before exporting. - * - * WITHIN THAT CONSTRAINT, permission to use, copy, modify, and - * distribute this software and its documentation for any purpose and - * without fee is hereby granted, provided that the above copyright - * notice appear in all copies and that both that copyright notice and - * this permission notice appear in supporting documentation, and that - * the name of M.I.T. not be used in advertising or publicity pertaining - * to distribution of the software without specific, written prior - * permission. Furthermore if you modify this software you must label - * your software as modified software and not distribute it in such a - * fashion that it might be confused with the original M.I.T. software. - * M.I.T. makes no representations about the suitability of - * this software for any purpose. It is provided "as is" without express - * or implied warranty. - * - * - * Iterate over the protocol addresses supported by this host, invoking - * a callback function or three supplied by the caller. - * - * XNS support is untested, but "should just work". (Hah!) - */ - -/* This function iterates over all the addresses it can find for the - local system, in one or two passes. In each pass, and between the - two, it can invoke callback functions supplied by the caller. The - two passes should operate on the same information, though not - necessarily in the same order each time. Duplicate and local - addresses should be eliminated. Storage passed to callback - functions should not be assumed to be valid after foreach_localaddr - returns. - - The int return value is an errno value (XXX or krb5_error_code - returned for a socket error) if something internal to - foreach_localaddr fails. If one of the callback functions wants to - indicate an error, it should store something via the 'data' handle. - If any callback function returns a non-zero value, - foreach_localaddr will clean up and return immediately. - - Multiple definitions are provided below, dependent on various - system facilities for extracting the necessary information. */ - -extern int -krb5int_foreach_localaddr (/*@null@*/ void *data, - int (*pass1fn) (/*@null@*/ void *, - struct sockaddr *) /*@*/, - /*@null@*/ int (*betweenfn) (/*@null@*/ void *) /*@*/, - /*@null@*/ int (*pass2fn) (/*@null@*/ void *, - struct sockaddr *) /*@*/) -#if defined(DEBUG) || defined(TEST) - /*@modifies fileSystem@*/ -#endif - ; - -#define foreach_localaddr krb5int_foreach_localaddr diff --git a/src/include/foreachaddr.h b/src/include/foreachaddr.h new file mode 100644 index 0000000000..57591f596e --- /dev/null +++ b/src/include/foreachaddr.h @@ -0,0 +1,64 @@ +/* + * include/foreachaddr.c + * + * Copyright 1990,1991,2000,2001,2002,2004 by the Massachusetts Institute of Technology. + * All Rights Reserved. + * + * Export of this software from the United States of America may + * require a specific license from the United States Government. + * It is the responsibility of any person or organization contemplating + * export to obtain such a license before exporting. + * + * WITHIN THAT CONSTRAINT, permission to use, copy, modify, and + * distribute this software and its documentation for any purpose and + * without fee is hereby granted, provided that the above copyright + * notice appear in all copies and that both that copyright notice and + * this permission notice appear in supporting documentation, and that + * the name of M.I.T. not be used in advertising or publicity pertaining + * to distribution of the software without specific, written prior + * permission. Furthermore if you modify this software you must label + * your software as modified software and not distribute it in such a + * fashion that it might be confused with the original M.I.T. software. + * M.I.T. makes no representations about the suitability of + * this software for any purpose. It is provided "as is" without express + * or implied warranty. + * + * + * Iterate over the protocol addresses supported by this host, invoking + * a callback function or three supplied by the caller. + * + * XNS support is untested, but "should just work". (Hah!) + */ + +/* This function iterates over all the addresses it can find for the + local system, in one or two passes. In each pass, and between the + two, it can invoke callback functions supplied by the caller. The + two passes should operate on the same information, though not + necessarily in the same order each time. Duplicate and local + addresses should be eliminated. Storage passed to callback + functions should not be assumed to be valid after foreach_localaddr + returns. + + The int return value is an errno value (XXX or krb5_error_code + returned for a socket error) if something internal to + foreach_localaddr fails. If one of the callback functions wants to + indicate an error, it should store something via the 'data' handle. + If any callback function returns a non-zero value, + foreach_localaddr will clean up and return immediately. + + Multiple definitions are provided below, dependent on various + system facilities for extracting the necessary information. */ + +extern int +krb5int_foreach_localaddr (/*@null@*/ void *data, + int (*pass1fn) (/*@null@*/ void *, + struct sockaddr *) /*@*/, + /*@null@*/ int (*betweenfn) (/*@null@*/ void *) /*@*/, + /*@null@*/ int (*pass2fn) (/*@null@*/ void *, + struct sockaddr *) /*@*/) +#if defined(DEBUG) || defined(TEST) + /*@modifies fileSystem@*/ +#endif + ; + +#define foreach_localaddr krb5int_foreach_localaddr -- cgit