diff --git a/include/patty/ax25/sock.h b/include/patty/ax25/sock.h index 046c153..6b86d30 100644 --- a/include/patty/ax25/sock.h +++ b/include/patty/ax25/sock.h @@ -1,6 +1,14 @@ #ifndef _PATTY_AX25_SOCK_H #define _PATTY_AX25_SOCK_H +enum patty_ax25_sock_type { + PATTY_AX25_SOCK_NONE, + PATTY_AX25_SOCK_UNIX = 1 << 0, + PATTY_AX25_SOCK_PTY = 1 << 1, + PATTY_AX25_SOCK_RAW = 1 << 2, + PATTY_AX25_SOCK_NONBLOCK = 1 << 3 +}; + enum patty_ax25_sock_status { PATTY_AX25_SOCK_CLOSED, PATTY_AX25_SOCK_LISTENING, @@ -13,18 +21,10 @@ enum patty_ax25_sock_mode { PATTY_AX25_SOCK_SABME }; -enum patty_ax25_sock_type { - PATTY_AX25_SOCK_NONE, - PATTY_AX25_SOCK_UNIX = 1 << 0, - PATTY_AX25_SOCK_PTY = 1 << 1, - PATTY_AX25_SOCK_RAW = 1 << 2, - PATTY_AX25_SOCK_NONBLOCK = 1 << 3 -}; - typedef struct _patty_ax25_sock { + enum patty_ax25_sock_type type; enum patty_ax25_sock_status status; enum patty_ax25_sock_mode mode; - enum patty_ax25_sock_type type; time_t timer_ack, timer_response, @@ -49,4 +49,6 @@ typedef struct _patty_ax25_sock { unsigned int hops; } patty_ax25_sock; +patty_ax25_sock *patty_ax25_sock_new(enum patty_ax25_sock_type type); + #endif /* _PATTY_AX25_SOCK_H */