blob: 3c054892b562a01b19d221f9279c82d866df5e75 [file] [log] [blame]
Shad Ansari01b0e652018-04-05 21:02:53 +00001/*
2 Copyright (C) 2018 Open Networking Foundation
3
4 This program is free software: you can redistribute it and/or modify
5 it under the terms of the GNU General Public License as published by
6 the Free Software Foundation, either version 3 of the License, or
7 (at your option) any later version.
8
9 This program is distributed in the hope that it will be useful,
10 but WITHOUT ANY WARRANTY; without even the implied warranty of
11 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
12 GNU General Public License for more details.
13
14 You should have received a copy of the GNU General Public License
15 along with this program. If not, see <http://www.gnu.org/licenses/>.
16*/
17#include <iostream>
18
19#include "indications.h"
20#include "server.h"
Shad Ansarib7b0ced2018-05-11 21:53:32 +000021#include "core.h"
Shad Ansari01b0e652018-04-05 21:02:53 +000022
23extern "C"
24{
25#include <bal_api.h>
26#include <bal_api_end.h>
27}
28
29int main(int argc, char** argv) {
30
Shad Ansaricb004c52018-05-30 18:07:23 +000031/*
Shad Ansari01b0e652018-04-05 21:02:53 +000032 if (argc < 5) {
33 std::cout << "Missing arguments" << std::endl;
34 exit(1);
35 }
Shad Ansaricb004c52018-05-30 18:07:23 +000036*/
Shad Ansari01b0e652018-04-05 21:02:53 +000037
38 bcmbal_init(argc, argv, NULL);
39
40 Status status = SubscribeIndication();
41 if (!status.ok()) {
42 std::cout << "ERROR: SubscribeIndication failed - "
43 << status.error_code() << ": " << status.error_message()
44 << std::endl;
45 return 1;
46 }
47
48 status = Enable_();
49 if (!status.ok()) {
50 std::cout << "ERROR: Enable_ failed - "
51 << status.error_code() << ": " << status.error_message()
52 << std::endl;
53 return 1;
54 }
55
56 RunServer();
57
58 return 0;
59}