Files
aaruremote/main.c

54 lines
1.4 KiB
C
Raw Normal View History

2019-10-12 13:06:21 +01:00
/*
2020-03-01 05:44:49 +00:00
* This file is part of the Aaru Remote Server.
2020-01-03 17:42:13 +00:00
* Copyright (c) 2019-2020 Natalia Portillo.
2019-10-12 13:06:21 +01:00
*
* This program is free software: you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
* the Free Software Foundation, version 3.
*
* This program is distributed in the hope that it will be useful, but
* WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
* General Public License for more details.
*
* You should have received a copy of the GNU General Public License
* along with this program. If not, see <http://www.gnu.org/licenses/>.
*/
#include "dicmote.h"
#include <stdio.h>
2019-10-12 18:40:49 +01:00
#include <stdlib.h>
#include <errno.h>
2019-10-12 23:52:48 +01:00
2019-10-12 13:06:21 +01:00
int main()
{
2019-10-19 18:30:45 +01:00
DicPacketHello* pkt_server_hello;
int ret;
2019-10-12 13:31:54 +01:00
2019-10-20 21:50:25 +01:00
Initialize();
2019-10-12 13:06:21 +01:00
printf("DiscImageChef Remote Server %s\n", DICMOTE_VERSION);
2020-01-03 17:42:13 +00:00
printf("Copyright (C) 2019-2020 Natalia Portillo\n");
2019-10-12 13:06:21 +01:00
pkt_server_hello = GetHello();
2019-10-12 17:28:09 +01:00
if(!pkt_server_hello)
2019-10-12 17:28:09 +01:00
{
printf("Error %d getting system version.\n", errno);
return 1;
}
printf(
"Running under %s %s (%s).\n", pkt_server_hello->sysname, pkt_server_hello->release, pkt_server_hello->machine);
2019-10-12 17:28:09 +01:00
2019-10-20 21:38:14 +01:00
ret = PrintNetworkAddresses();
if(ret)
{
printf("Error %d enumerating interfaces\n", errno);
return 1;
}
2019-10-20 21:50:25 +01:00
PlatformLoop(pkt_server_hello);
2019-10-12 13:06:21 +01:00
}