10Sstevel@tonic-gate /* 20Sstevel@tonic-gate * Author: Tatu Ylonen <ylo@cs.hut.fi> 30Sstevel@tonic-gate * Copyright (c) 1995 Tatu Ylonen <ylo@cs.hut.fi>, Espoo, Finland 40Sstevel@tonic-gate * All rights reserved 50Sstevel@tonic-gate * 60Sstevel@tonic-gate * As far as I am concerned, the code I have written for this software 70Sstevel@tonic-gate * can be used freely for any purpose. Any derived versions of this 80Sstevel@tonic-gate * software must be clearly marked as such, and if the derived work is 90Sstevel@tonic-gate * incompatible with the protocol description in the RFC file, it must be 100Sstevel@tonic-gate * called by a name other than "ssh" or "Secure Shell". 110Sstevel@tonic-gate */ 120Sstevel@tonic-gate 13*5243Sjp161948 #ifndef _HOSTFILE_H 14*5243Sjp161948 #define _HOSTFILE_H 15*5243Sjp161948 16*5243Sjp161948 /* $OpenBSD: hostfile.h,v 1.12 2002/09/08 20:24:08 markus Exp $ */ 17*5243Sjp161948 18*5243Sjp161948 #pragma ident "%Z%%M% %I% %E% SMI" 19*5243Sjp161948 20*5243Sjp161948 #ifdef __cplusplus 21*5243Sjp161948 extern "C" { 22*5243Sjp161948 #endif 23*5243Sjp161948 240Sstevel@tonic-gate typedef enum { 250Sstevel@tonic-gate HOST_OK, HOST_NEW, HOST_CHANGED, HOST_FOUND 260Sstevel@tonic-gate } HostStatus; 270Sstevel@tonic-gate 280Sstevel@tonic-gate int hostfile_read_key(char **, u_int *, Key *); 290Sstevel@tonic-gate HostStatus 30*5243Sjp161948 check_host_in_hostfile(const char *, const char *, const Key *, Key *, int *); 31*5243Sjp161948 int add_host_to_hostfile(const char *, const char *, const Key *, int); 32*5243Sjp161948 int 330Sstevel@tonic-gate lookup_key_in_hostfile_by_type(const char *, const char *, int , Key *, int *); 340Sstevel@tonic-gate 35*5243Sjp161948 #define HASH_MAGIC "|1|" 36*5243Sjp161948 #define HASH_DELIM '|' 37*5243Sjp161948 38*5243Sjp161948 char *host_hash(const char *, const char *, u_int); 39*5243Sjp161948 400Sstevel@tonic-gate #ifdef __cplusplus 410Sstevel@tonic-gate } 420Sstevel@tonic-gate #endif 430Sstevel@tonic-gate 440Sstevel@tonic-gate #endif /* _HOSTFILE_H */ 45