mirror of
https://git.rtems.org/rtems-libbsd/
synced 2025-07-03 09:12:07 +08:00
Added rtems_bsdnet_log_host_address and its initialization to userspace.
This commit is contained in:
parent
210671ae7d
commit
afcd88e1fe
@ -125,6 +125,7 @@ C_FILES += lib/libc/db/mpool/mpool.c
|
||||
# RTEMS Specific Files
|
||||
# C_FILES += rtems/rtems-net-setup.c
|
||||
C_FILES += rtems/syslog.c
|
||||
C_FILES += rtems/rtems-syslog-initialize.c
|
||||
|
||||
# ping command sources
|
||||
C_FILES += commands/sbin/ping/ping.c
|
||||
|
21
freebsd-userspace/rtems/rtems-syslog-initialize.c
Normal file
21
freebsd-userspace/rtems/rtems-syslog-initialize.c
Normal file
@ -0,0 +1,21 @@
|
||||
/*
|
||||
* RTEMS version of syslog initialization
|
||||
*/
|
||||
|
||||
#include <sys/socket.h>
|
||||
#include <netinet/in.h>
|
||||
#include <arpa/inet.h>
|
||||
|
||||
|
||||
struct in_addr rtems_bsdnet_log_host_address = {0};
|
||||
|
||||
int rtems_syslog_initialize(const char *log_host)
|
||||
{
|
||||
struct in_addr *i;
|
||||
|
||||
i = &rtems_bsdnet_log_host_address;
|
||||
|
||||
if (log_host)
|
||||
i->s_addr = inet_addr(log_host);
|
||||
return 0;
|
||||
}
|
Loading…
x
Reference in New Issue
Block a user