xauth.h revision 96402570
1/* 2 * 3Copyright 1989, 1998 The Open Group 4 5Permission to use, copy, modify, distribute, and sell this software and its 6documentation for any purpose is hereby granted without fee, provided that 7the above copyright notice appear in all copies and that both that 8copyright notice and this permission notice appear in supporting 9documentation. 10 11The above copyright notice and this permission notice shall be included in 12all copies or substantial portions of the Software. 13 14THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR 15IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, 16FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE 17OPEN GROUP BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN 18AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN 19CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. 20 21Except as contained in this notice, the name of The Open Group shall not be 22used in advertising or otherwise to promote the sale, use or other dealings 23in this Software without prior written authorization from The Open Group. 24 * * 25 * Author: Jim Fulton, MIT X Consortium 26 */ 27 28#include <stdio.h> 29#include <X11/Xos.h> 30#include <X11/Xauth.h> 31#include <X11/Xfuncs.h> 32 33#ifndef True 34typedef int Bool; 35#define False 0 36#define True 1 37#endif 38 39extern const char *ProgramName; 40 41#include <stdlib.h> 42 43struct addrlist { 44 struct addrlist *next; 45 char *address; 46 int len; 47 int family; 48}; 49 50extern const char *get_hostname ( Xauth *auth ); 51extern struct addrlist *get_address_info ( int family, const char *fulldpyname, int prefix, char *host); 52extern char *copystring ( const char *src, int len ); 53extern char *get_local_hostname ( char *buf, int maxlen ); 54extern Bool parse_displayname ( const char *displayname, int *familyp, char **hostp, int *dpynump, int *scrnump, char **restp ); 55extern int auth_initialize ( const char *authfilename ); 56extern int auth_finalize ( void ); 57extern int process_command ( const char *inputfilename, int lineno, int argc, const char **argv ); 58extern int print_help ( FILE *fp, const char *cmd, const char *prefix ); 59extern int verbose; 60extern Bool ignore_locks; 61extern Bool break_locks; 62extern Bool no_name_lookups; 63