2
* This file is part of the SSH Library
4
* Copyright (c) 2009 by Aris Adamantiadis
6
* The SSH Library is free software; you can redistribute it and/or modify
7
* it under the terms of the GNU Lesser General Public License as published by
8
* the Free Software Foundation; either version 2.1 of the License, or (at your
9
* option) any later version.
11
* The SSH Library is distributed in the hope that it will be useful, but
12
* WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY
13
* or FITNESS FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public
14
* License for more details.
16
* You should have received a copy of the GNU Lesser General Public License
17
* along with the SSH Library; see the file COPYING. If not, write to
18
* the Free Software Foundation, Inc., 59 Temple Place - Suite 330, Boston,
26
/* gets the user home dir. */
27
char *ssh_get_user_home_dir(void);
28
int ssh_file_readaccess_ok(const char *file);
30
/* macro for byte ordering */
31
uint64_t ntohll(uint64_t);
32
#define htonll(x) ntohll(x)
37
struct ssh_iterator *root;
38
struct ssh_iterator *end;
42
struct ssh_iterator *next;
46
struct ssh_list *ssh_list_new(void);
47
void ssh_list_free(struct ssh_list *list);
48
struct ssh_iterator *ssh_list_get_iterator(const struct ssh_list *list);
49
int ssh_list_add(struct ssh_list *list, const void *data);
50
void ssh_list_remove(struct ssh_list *list, struct ssh_iterator *iterator);
52
/** @brief fetch the head element of a list and remove it from list
53
* @param list the ssh_list to use
54
* @return the first element of the list
56
const void *_ssh_list_get_head(struct ssh_list *list);
58
#define ssh_iterator_value(type, iterator)\
59
((type)((iterator)->data))
61
/** @brief fetch the head element of a list and remove it from list
62
* @param type type of the element to return
63
* @param list the ssh_list to use
64
* @return the first element of the list
66
#define ssh_list_get_head(type, ssh_list)\
67
((type)_ssh_list_get_head(ssh_list))