PageRenderTime 19ms CodeModel.GetById 13ms app.highlight 3ms RepoModel.GetById 1ms app.codeStats 0ms

/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
 26#ifndef _STRESS_RECV_H
 27#define	_STRESS_RECV_H
 28
 29
 30#define	UNBIND		0x06UL
 31#define	UNBIND_RESP	0x80000006UL
 32#define BIND_RECV	0x1UL
 33#define BIND_RECV_RESP	0x80000001UL
 34#define DELIVER_SM	0x05UL
 35#define DELIVER_SM_RESP	0x80000005UL
 36
 37#define SMSC_ID		"recv_stresser"
 38
 39
 40/* Send 10,000 messages by default. */
 41#define	DEFAULT_MSG_COUNT	10000L
 42
 43/* Default port to listen on */
 44#define	DEFAULT_LISTEN_PORT	5432
 45
 46
 47typedef struct _smpp_header
 48{
 49	uint32_t cmd_len;
 50	uint32_t cmd_id;
 51	uint32_t cmd_status;
 52	uint32_t seq_num;
 53} smpp_header;
 54
 55
 56typedef struct _bind_receiver
 57{
 58	uint32_t cmd_len;
 59	uint32_t cmd_id;
 60	uint32_t cmd_status;
 61	uint32_t seq_num;
 62
 63	char sys_id[16];
 64	char password[9];
 65	char sys_type[13];
 66	char interface_version;
 67	char addr_ton;
 68	char addr_npi;
 69	char addr_range[41];
 70} bind_receiver;
 71
 72typedef struct _bind_receiver_resp
 73{
 74	uint32_t cmd_len;
 75	uint32_t cmd_id;
 76	uint32_t cmd_status;
 77	uint32_t seq_num;
 78
 79	char sys_id[16];
 80} bind_receiver_resp;
 81
 82
 83typedef struct _deliver_sm
 84{
 85	uint32_t cmd_len;
 86	uint32_t cmd_id;
 87	uint32_t cmd_status;
 88	uint32_t seq_num;
 89
 90	char service_type[6];
 91	char source_ton;
 92	char source_npi;
 93	char source_addr[21];
 94
 95	char dest_ton;
 96	char dest_npi;
 97	char dest_addr[21];
 98
 99	char esm_class;
100	char protocol_id;
101	char priority;
102	char delivery_time[17];
103	char expiry_time[17];
104	char registered;
105	char replace_if_present;
106	char data_coding;
107	char default_msg_id;
108	char sm_length;
109	char message[160];
110} deliver_sm;
111
112#endif /* _STRESS_RECV_H */