/protocols/smpp/misc/stress_recv.h

http://mobicents.googlecode.com/ · C Header · 112 lines · 66 code · 20 blank · 26 comment · 0 complexity · d5260a64c3767b7f2703772c930d9b4e MD5 · raw file

  1. /*
  2. * Java SMPP API
  3. * Copyright (C) 1998 - 2002 by Oran Kelly
  4. *
  5. * This library is free software; you can redistribute it and/or
  6. * modify it under the terms of the GNU Lesser General Public
  7. * License as published by the Free Software Foundation; either
  8. * version 2.1 of the License, or (at your option) any later version.
  9. *
  10. * This library is distributed in the hope that it will be useful,
  11. * but WITHOUT ANY WARRANTY; without even the implied warranty of
  12. * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
  13. * Lesser General Public License for more details.
  14. *
  15. * You should have received a copy of the GNU Lesser General Public
  16. * License along with this library; if not, write to the Free Software
  17. * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
  18. *
  19. * A copy of the LGPL can be viewed at http://www.gnu.org/copyleft/lesser.html
  20. * Java SMPP API author: orank@users.sf.net
  21. * Java SMPP API Homepage: http://smppapi.sourceforge.net/
  22. *
  23. * $Id: stress_recv.h 242 2005-11-14 20:37:19Z orank $
  24. */
  25. #ifndef _STRESS_RECV_H
  26. #define _STRESS_RECV_H
  27. #define UNBIND 0x06UL
  28. #define UNBIND_RESP 0x80000006UL
  29. #define BIND_RECV 0x1UL
  30. #define BIND_RECV_RESP 0x80000001UL
  31. #define DELIVER_SM 0x05UL
  32. #define DELIVER_SM_RESP 0x80000005UL
  33. #define SMSC_ID "recv_stresser"
  34. /* Send 10,000 messages by default. */
  35. #define DEFAULT_MSG_COUNT 10000L
  36. /* Default port to listen on */
  37. #define DEFAULT_LISTEN_PORT 5432
  38. typedef struct _smpp_header
  39. {
  40. uint32_t cmd_len;
  41. uint32_t cmd_id;
  42. uint32_t cmd_status;
  43. uint32_t seq_num;
  44. } smpp_header;
  45. typedef struct _bind_receiver
  46. {
  47. uint32_t cmd_len;
  48. uint32_t cmd_id;
  49. uint32_t cmd_status;
  50. uint32_t seq_num;
  51. char sys_id[16];
  52. char password[9];
  53. char sys_type[13];
  54. char interface_version;
  55. char addr_ton;
  56. char addr_npi;
  57. char addr_range[41];
  58. } bind_receiver;
  59. typedef struct _bind_receiver_resp
  60. {
  61. uint32_t cmd_len;
  62. uint32_t cmd_id;
  63. uint32_t cmd_status;
  64. uint32_t seq_num;
  65. char sys_id[16];
  66. } bind_receiver_resp;
  67. typedef struct _deliver_sm
  68. {
  69. uint32_t cmd_len;
  70. uint32_t cmd_id;
  71. uint32_t cmd_status;
  72. uint32_t seq_num;
  73. char service_type[6];
  74. char source_ton;
  75. char source_npi;
  76. char source_addr[21];
  77. char dest_ton;
  78. char dest_npi;
  79. char dest_addr[21];
  80. char esm_class;
  81. char protocol_id;
  82. char priority;
  83. char delivery_time[17];
  84. char expiry_time[17];
  85. char registered;
  86. char replace_if_present;
  87. char data_coding;
  88. char default_msg_id;
  89. char sm_length;
  90. char message[160];
  91. } deliver_sm;
  92. #endif /* _STRESS_RECV_H */