modify makefile eventually again

This commit is contained in:
lr
2024-05-17 15:23:08 +08:00
parent 18537fc922
commit 514b9973b6
5 changed files with 45 additions and 4 deletions
@@ -0,0 +1,39 @@
/*
* Copyright (c) 2020 AIIT XUOS Lab
* XiUOS is licensed under Mulan PSL v2.
* You can use this software according to the terms and conditions of the Mulan PSL v2.
* You may obtain a copy of Mulan PSL v2 at:
* http://license.coscl.org.cn/MulanPSL2
* THIS SOFTWARE IS PROVIDED ON AN "AS IS" BASIS, WITHOUT WARRANTIES OF ANY KIND,
* EITHER EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO NON-INFRINGEMENT,
* MERCHANTABILITY OR FIT FOR A PARTICULAR PURPOSE.
* See the Mulan PSL v2 for more details.
*/
// test_net: Test the lwip network stack
#include <assert.h>
#include <stdbool.h>
#include <string.h>
#include "libserial.h"
#include "lwip_service.h"
#include "usyscall.h"
int main(int argc, char* argv[])
{
printf("lwip network stack test \n");
struct Session sess;
connect_session(&sess, "LWIPServer", 4096);
char lwip_ipaddr[4] = { 192, 168, 130, 77 };
char lwip_netmask[4] = { 255, 255, 254, 0 };
char lwip_gwaddr[4] = { 192, 168, 130, 1 };
LWIP_init(&sess, lwip_ipaddr, lwip_netmask, lwip_ipaddr);
free_session(&session);
exit(0);
return 0;
}