hoffmeis: Preparations for syslog support (LOGSERVER in DHCP, linewise
output buffering defintions and the like)
This commit is contained in:
parent
ff5aac826a
commit
ed7dc02a95
|
@ -74,6 +74,10 @@ REQUIRE_OBJECT ( btext );
|
||||||
REQUIRE_OBJECT ( pc_kbd );
|
REQUIRE_OBJECT ( pc_kbd );
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
|
#ifdef CONSOLE_SYSLOG
|
||||||
|
REQUIRE_OBJECT ( syslog );
|
||||||
|
#endif
|
||||||
|
|
||||||
/*
|
/*
|
||||||
* Drag in all requested protocols
|
* Drag in all requested protocols
|
||||||
*
|
*
|
||||||
|
|
|
@ -30,8 +30,8 @@
|
||||||
struct console_driver {
|
struct console_driver {
|
||||||
/** Console is disabled.
|
/** Console is disabled.
|
||||||
*
|
*
|
||||||
* The console's putchar(), getchar() and iskey() methods will
|
* The console's putchar(), putline(), getchar() and iskey()
|
||||||
* not be called while #disabled==1. Typically the
|
* methods will not be called while #disabled==1. Typically the
|
||||||
* console's initialisation functions (called via INIT_FN())
|
* console's initialisation functions (called via INIT_FN())
|
||||||
* will set #disabled=0 upon completion.
|
* will set #disabled=0 upon completion.
|
||||||
*
|
*
|
||||||
|
@ -47,6 +47,17 @@ struct console_driver {
|
||||||
*/
|
*/
|
||||||
void ( *putchar ) ( int character );
|
void ( *putchar ) ( int character );
|
||||||
|
|
||||||
|
/** Write an entire line to the console.
|
||||||
|
* This is intended to be used by line-oriented output media,
|
||||||
|
* like system logging facilities or line printers.
|
||||||
|
* Line output will not contain non-printable characters.
|
||||||
|
*
|
||||||
|
* @v linebuffer Pointer to the \0-terminated line
|
||||||
|
* @ret None -
|
||||||
|
* @err None -
|
||||||
|
*/
|
||||||
|
void ( * putline ) ( unsigned char * linebuffer );
|
||||||
|
|
||||||
/** Read a character from the console.
|
/** Read a character from the console.
|
||||||
*
|
*
|
||||||
* @v None -
|
* @v None -
|
||||||
|
|
|
@ -60,6 +60,9 @@
|
||||||
/** DNS servers */
|
/** DNS servers */
|
||||||
#define DHCP_DNS_SERVERS 6
|
#define DHCP_DNS_SERVERS 6
|
||||||
|
|
||||||
|
/** Syslog servers */
|
||||||
|
#define DHCP_LOG_SERVERS 7
|
||||||
|
|
||||||
/** Host name */
|
/** Host name */
|
||||||
#define DHCP_HOST_NAME 12
|
#define DHCP_HOST_NAME 12
|
||||||
|
|
||||||
|
|
|
@ -54,7 +54,7 @@ static uint8_t dhcp_request_options_data[] = {
|
||||||
DHCP_VENDOR_CLASS_ID,
|
DHCP_VENDOR_CLASS_ID,
|
||||||
DHCP_STRING ( 'E', 't', 'h', 'e', 'r', 'b', 'o', 'o', 't' ),
|
DHCP_STRING ( 'E', 't', 'h', 'e', 'r', 'b', 'o', 'o', 't' ),
|
||||||
DHCP_PARAMETER_REQUEST_LIST,
|
DHCP_PARAMETER_REQUEST_LIST,
|
||||||
DHCP_OPTION ( DHCP_SUBNET_MASK, DHCP_ROUTERS, DHCP_DNS_SERVERS,
|
DHCP_OPTION ( DHCP_SUBNET_MASK, DHCP_ROUTERS, DHCP_DNS_SERVERS, DHCP_LOG_SERVERS,
|
||||||
DHCP_HOST_NAME, DHCP_DOMAIN_NAME, DHCP_ROOT_PATH,
|
DHCP_HOST_NAME, DHCP_DOMAIN_NAME, DHCP_ROOT_PATH,
|
||||||
DHCP_VENDOR_ENCAP, DHCP_TFTP_SERVER_NAME,
|
DHCP_VENDOR_ENCAP, DHCP_TFTP_SERVER_NAME,
|
||||||
DHCP_BOOTFILE_NAME, DHCP_EB_ENCAP,
|
DHCP_BOOTFILE_NAME, DHCP_EB_ENCAP,
|
||||||
|
|
|
@ -37,6 +37,9 @@
|
||||||
/* Avoid dragging in dns.o */
|
/* Avoid dragging in dns.o */
|
||||||
struct in_addr nameserver;
|
struct in_addr nameserver;
|
||||||
|
|
||||||
|
/* Avoid dragging in syslog.o */
|
||||||
|
struct in_addr syslogserver;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Configure network device via DHCP
|
* Configure network device via DHCP
|
||||||
*
|
*
|
||||||
|
@ -97,6 +100,8 @@ int dhcp ( struct net_device *netdev ) {
|
||||||
/* Retrieve other DHCP options that we care about */
|
/* Retrieve other DHCP options that we care about */
|
||||||
find_dhcp_ipv4_option ( dhcp_options, DHCP_DNS_SERVERS,
|
find_dhcp_ipv4_option ( dhcp_options, DHCP_DNS_SERVERS,
|
||||||
&nameserver );
|
&nameserver );
|
||||||
|
find_dhcp_ipv4_option ( dhcp_options, DHCP_LOG_SERVERS,
|
||||||
|
&syslogserver );
|
||||||
|
|
||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
|
|
Reference in New Issue