1 #ifndef __QUEUE_H 2 #define __QUEUE_H 3 #include "term.h" 4 #include // timeval 5 #include // sockaddr_in 6 #define MMSIZE 1500 - sizeof( struct iphdr ) - sizeof( struct udphdr ) 7 typedef unsigned int u_int; 8 typedef unsigned long u_long; 9 extern u_int id; 10 class queue 11 { public: 12 int locked; 13 struct event 14 { 15 timeval tv; 16 u_int input; 17 u_int owner; 18 struct event* next; 19 }; 20 event* q; 21 term* output; 22 long* lastfrom; 23 u_int clients; 24 int sock; 25 struct sockaddr_in to; 26 timeval when; 27 timeval stamp; 28 dword strokes; 29 word sending; 30 char* inbuf; 31 ~queue(); 32 queue( term* _output, int sock, struct sockaddr_in _to, int id ); 33 void signal( char* buffer, int length, int sender, timeval _stamp ); 34 void disperse(); 35 void enqueue( u_int input ); 36 void xmit(); 37 void pipe( u_char input ); 38 void func( u_char input ); 39 void arrow( u_char input ); 40 }; 41 #define BS 0x301 42 #define CR 0x302 43 #define DEL 0x303 44 #define INS 0x304 45 #define HOME 0x305 46 #define END 0x306 47 #define PAN_LEFT 0x307 48 #define PAN_RIGHT 0x308 49 #endif // __QUEUE_H