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

Subversion Repositories openrisc_me

[/] [openrisc/] [trunk/] [rtos/] [ecos-2.0/] [packages/] [net/] [common/] [v2_0/] [include/] [network.h] - Blame information for rev 174

Details | Compare with Previous | View Log

Line No. Rev Author Line
1 27 unneback
//==========================================================================
2
//
3
//      include/network.h
4
//
5
//      Misc network support
6
//
7
//==========================================================================
8
//####BSDCOPYRIGHTBEGIN####
9
//
10
// -------------------------------------------
11
//
12
// Portions of this software may have been derived from OpenBSD or other sources,
13
// and are covered by the appropriate copyright disclaimers included herein.
14
//
15
// -------------------------------------------
16
//
17
//####BSDCOPYRIGHTEND####
18
//==========================================================================
19
//#####DESCRIPTIONBEGIN####
20
//
21
// Author(s):    gthomas
22
// Contributors: gthomas
23
// Date:         2000-01-10
24
// Purpose:      
25
// Description:  
26
//              
27
//
28
//####DESCRIPTIONEND####
29
//
30
//==========================================================================
31
 
32
#ifndef _NETWORK_H_
33
#define _NETWORK_H_
34
 
35
#define NO_LIBKERN_INLINE  // Avoid kernel inline functions
36
 
37
#include <pkgconf/system.h>
38
#include <pkgconf/net.h>
39
#undef _KERNEL
40
#include <sys/param.h>
41
#include <sys/socket.h>
42
#include <sys/ioctl.h>
43
#include <sys/errno.h>
44
 
45
#include <net/if.h>
46
#include <netinet/in.h>
47
#include <netinet/ip.h>
48
#include <netinet/ip_icmp.h>
49
#include <net/route.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 *);
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
#endif // _NETWORK_H_

powered by: WebSVN 2.1.0

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