1 /* 2 * Copyright 2003-2004, Waldemar Kornewald <wkornew@gmx.net> 3 * Distributed under the terms of the MIT License. 4 */ 5 #ifndef MODEM__H 6 #define MODEM__H 7 8 #include <SupportDefs.h> 9 #include <net/if.h> 10 11 #include <net_buffer.h> 12 #include <net_stack.h> 13 14 15 class ModemDevice; 16 17 #define CONTROL_ESCAPE 0x7d 18 #define FLAG_SEQUENCE 0x7e 19 #define ALL_STATIONS 0xff 20 #define UI 0x03 21 22 #define ESCAPE_DELAY 1000000 23 #define ESCAPE_SEQUENCE "+++" 24 #define AT_HANG_UP "ATH0" 25 26 #define MODEM_MTU 1502 27 #define PACKET_OVERHEAD 8 28 #define MODEM_TIMEOUT 3000000 29 // 3 seconds 30 #define MODEM_PORT_KEY "Port" 31 #define MODEM_INIT_KEY "Init" 32 #define MODEM_DIAL_KEY "Dial" 33 34 extern net_stack_module_info *gStackModule; 35 extern net_buffer_module_info *gBufferModule; 36 37 38 #if DEBUG 39 // defined in ModemDevice.cpp 40 extern void dump_packet(net_buffer *packet); 41 #endif // DEBUG 42 43 44 #endif 45