blob: 78e641e82eff56df605e2b739c9431d17b0d226d [file] [log] [blame]
Harald Welte4b233b42012-11-07 08:32:31 +01001
2/*
3 * Copyright (C) 2006 Raul Tremsal
4 * File : bind_transmitter_test.c
5 * Author: Raul Tremsal <ultraismo@yahoo.com>
6 *
7 * This file is part of libsmpp34 (c-open-smpp3.4 library).
8 *
9 * The libsmpp34 library is free software; you can redistribute it and/or
10 * modify it under the terms of the GNU Lesser General Public License as
11 * published by the Free Software Foundation; either version 2.1 of the
12 * License, or (at your option) any later version.
13 *
14 * This library is distributed in the hope that it will be useful, but
15 * WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY
16 * or FITNESS FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public
17 * License for more details.
18 *
19 * You should have received a copy of the GNU Lesser General Public License
20 * along with this library; if not, write to the Free Software Foundation,
21 * Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
22 *
23 */
24
25#include <stdio.h>
26#include <string.h>
27#include <sys/types.h>
28#include <netinet/in.h>
29
30#ifdef __linux__
31#include <stdint.h>
32#endif
33
34#include "smpp34.h"
35#include "smpp34_structs.h"
36#include "smpp34_params.h"
37#include "core.h"
38
39int
40main( int argc, char *argv[] )
41{
42
43 bind_transmitter_t a;
44 bind_transmitter_t b;
45
46 memset(&a, 0, sizeof(bind_transmitter_t));
47 memset(&b, 0, sizeof(bind_transmitter_t));
48
49 /* Init PDU ***********************************************************/
50 b.command_length = 0;
51 b.command_id = BIND_TRANSMITTER;
52 b.command_status = ESME_ROK;
53 b.sequence_number = 1;
54 snprintf((char*)b.system_id, sizeof(b.system_id), "%s", "system_id");
55 snprintf((char*)b.password, sizeof(b.password), "%s", "pass");
56 snprintf((char*)b.system_type, sizeof(b.system_type), "%s", "syst");
57 b.interface_version = 0x34;
58 b.addr_ton = 2;
59 b.addr_npi = 1;
60 snprintf((char*)b.address_range, sizeof(b.address_range), "%s", "address_range");
61
62 doTest(BIND_TRANSMITTER, &a, &b);
63 return( 0 );
64};