view list.h @ 896:a1a97e98b0c1

Read (and enqueue) packets from interactive input even when we're waiting for a key exchange. This should hopefully fix the situation where "~." doesn't work to terminate a client session when a laptop wakes up. The client will be stuck waiting for a key exchange on a dead connection, so won't have read the escape character
author Matt Johnston <matt@ucc.asn.au>
date Mon, 17 Feb 2014 21:41:06 +0800
parents 96bcb20e7e03
children deed0571cacc
line wrap: on
line source

#ifndef _DROPBEAR_LIST_H
#define _DROPBEAR_LIST_H

struct _m_list;

struct _m_list_elem {
    void *item;
	struct _m_list_elem *next;
	struct _m_list_elem *prev;
    struct _m_list *list;
};
	
typedef struct _m_list_elem m_list_elem;

struct _m_list {
    m_list_elem *first;
    m_list_elem *last;
};

typedef struct _m_list m_list;

m_list * list_new();
void list_append(m_list *list, void *item);
/* returns the item for the element removed */
void * list_remove(m_list_elem *elem);


#endif /* _DROPBEAR_LIST_H */