mirror of
https://github.com/genodelabs/genode.git
synced 2024-12-23 15:32:25 +00:00
8f0c789ed4
* Remove far too low default values from Nic::Connection constructor * Extend lwip initialization function with desired TX/RX buffer sizes * Add configuration possibility to libc_lwip_dhcp plugin to define buffer sizes, like the following: '<libc tx_buf_size="1M" tx_buf_size="1M"/>' Fixes #892
55 lines
1.3 KiB
C
55 lines
1.3 KiB
C
/*
|
|
* \brief Genode-specific lwIP API
|
|
* \author Christian Helmuth
|
|
* \author Stefan Kalkowski
|
|
* \date 2010-02-22
|
|
*
|
|
* This header is included from C sources.
|
|
*/
|
|
|
|
/*
|
|
* Copyright (C) 2010-2013 Genode Labs GmbH
|
|
*
|
|
* This file is part of the Genode OS framework, which is distributed
|
|
* under the terms of the GNU General Public License version 2.
|
|
*/
|
|
|
|
#ifndef __LWIP__GENODE_H__
|
|
#define __LWIP__GENODE_H__
|
|
|
|
#include <base/fixed_stdint.h>
|
|
|
|
#ifdef __cplusplus
|
|
extern "C" {
|
|
#endif
|
|
|
|
/** Initialize the TCP/IP stack */
|
|
void lwip_tcpip_init(void);
|
|
|
|
/**
|
|
* Initialize lwIP for NIC session
|
|
*
|
|
* \param ip_addr IPv4 address in network byte order, or zero when requesting
|
|
* DHCP
|
|
* \param netmask IPv4 network mask in network byte order
|
|
* \param gateway IPv4 network-gateway address in network byte order
|
|
* \param tx_buf_size packet stream buffer size for TX direction
|
|
* \param rx_buf_size packet stream buffer size for RX direction
|
|
*
|
|
* \return 0 on success, or 1 if DHCP failed.
|
|
*
|
|
* This function initializes Genode's nic_drv and does optionally send DHCP
|
|
* requests.
|
|
*/
|
|
int lwip_nic_init(genode_int32_t ip_addr,
|
|
genode_int32_t netmask,
|
|
genode_int32_t gateway,
|
|
__SIZE_TYPE__ tx_buf_size,
|
|
__SIZE_TYPE__ rx_buf_size);
|
|
|
|
#ifdef __cplusplus
|
|
}
|
|
#endif
|
|
|
|
#endif /* __LWIP__GENODE_H__ */
|