OpenCores
URL https://opencores.org/ocsvn/openrisc/openrisc/trunk

Subversion Repositories openrisc

[/] [openrisc/] [trunk/] [rtos/] [ecos-3.0/] [packages/] [net/] [common/] [current/] [include/] [network.h] - Blame information for rev 857

Go to most recent revision | Details | Compare with Previous | View Log

Line No. Rev Author Line
1 786 skrzyp
 
2
//==========================================================================
3
//
4
//      include/network.h
5
//
6
//      Misc network support
7
//
8
//==========================================================================
9
// ####BSDALTCOPYRIGHTBEGIN####                                             
10
// -------------------------------------------                              
11
// Portions of this software may have been derived from FreeBSD, OpenBSD,   
12
// or other sources, and if so are covered by the appropriate copyright     
13
// and license included herein.                                             
14
// -------------------------------------------                              
15
// ####BSDALTCOPYRIGHTEND####                                               
16
//==========================================================================
17
//#####DESCRIPTIONBEGIN####
18
//
19
// Author(s):    gthomas
20
// Contributors: gthomas, andrew.lunn@ascom.ch
21
// Date:         2000-01-10
22
// Purpose:      
23
// Description:  
24
//              
25
//
26
//####DESCRIPTIONEND####
27
//
28
//==========================================================================
29
 
30
#ifndef _NETWORK_H_
31
#define _NETWORK_H_
32
 
33
#define NO_LIBKERN_INLINE  // Avoid kernel inline functions
34
 
35
#include <pkgconf/system.h>
36
#include <pkgconf/net.h>
37
#include <pkgconf/io_eth_drivers.h>
38
#undef _KERNEL
39
#include <sys/param.h>
40
#include <sys/socket.h>
41
#include <sys/ioctl.h>
42
#include <sys/errno.h>
43
 
44
#include <net/if.h>
45
#include <netinet/in.h>
46
#include <netinet/ip.h>
47
#include <netinet/ip_icmp.h>
48
#include <net/route.h>
49
#include <string.h>
50
 
51
#include <cyg/infra/diag.h>
52
#include <cyg/kernel/kapi.h>
53
 
54
#include <netdb.h>
55
#include <bootp.h>
56
 
57
#ifdef CYGHWR_NET_DRIVER_ETH0
58
extern struct bootp eth0_bootp_data;
59
extern cyg_bool_t   eth0_up;
60
extern const char  *eth0_name;
61
#endif
62
#ifdef CYGHWR_NET_DRIVER_ETH1
63
extern struct bootp eth1_bootp_data;
64
extern cyg_bool_t   eth1_up;
65
extern const char  *eth1_name;
66
#endif
67
 
68
__externC void init_all_network_interfaces(void);
69
 
70
__externC void     cyg_route_reinit(void);
71
__externC void     perror(const char *) __THROW;
72
__externC int      close(int);
73
__externC ssize_t  read(int, void *, size_t);
74
__externC ssize_t  write(int, const void *, size_t);
75
__externC int      select(int, fd_set *, fd_set *, fd_set *, struct timeval *tv);
76
 
77
// This API is for our own automated network tests.
78
// It's not at all supported.
79
#define CYG_NET_GET_MEM_STATS_MISC  0 // Misc mpool
80
#define CYG_NET_GET_MEM_STATS_MBUFS 1 // Mbufs pool
81
#define CYG_NET_GET_MEM_STATS_CLUST 2 // Clust pool
82
int cyg_net_get_mem_stats( int which, cyg_mempool_info *p );
83
 
84
#ifdef CYGPKG_NET_INET6
85
#ifdef CYGOPT_NET_IPV6_ROUTING_THREAD 
86
__externC void ipv6_start_routing_thread(void);
87
__externC int cyg_net_get_ipv6_advrouter(struct sockaddr_in6 * addr);
88
#endif
89
#endif
90
 
91
#endif // _NETWORK_H_

powered by: WebSVN 2.1.0

© copyright 1999-2025 OpenCores.org, equivalent to Oliscience, all rights reserved. OpenCores®, registered trademark.