libIEC61850
0.8.4
Open-source IEC 61850 MMS/GOOSE server and client library
Main Page
Modules
Classes
Files
File List
File Members
All
Classes
Files
Functions
Variables
Typedefs
Enumerations
Enumerator
Macros
Groups
Pages
hal
inc
hal_ethernet.h
Go to the documentation of this file.
1
/*
2
* ethernet_hal.h
3
*
4
* Copyright 2013, 2014 Michael Zillgith
5
*
6
* This file is part of libIEC61850.
7
*
8
* libIEC61850 is free software: you can redistribute it and/or modify
9
* it under the terms of the GNU General Public License as published by
10
* the Free Software Foundation, either version 3 of the License, or
11
* (at your option) any later version.
12
*
13
* libIEC61850 is distributed in the hope that it will be useful,
14
* but WITHOUT ANY WARRANTY; without even the implied warranty of
15
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
16
* GNU General Public License for more details.
17
*
18
* You should have received a copy of the GNU General Public License
19
* along with libIEC61850. If not, see <http://www.gnu.org/licenses/>.
20
*
21
* See COPYING file for the complete license text.
22
*/
23
24
#ifndef ETHERNET_HAL_H_
25
#define ETHERNET_HAL_H_
26
27
#include <stdint.h>
28
#include <stdbool.h>
29
30
#ifdef __cplusplus
31
extern
"C"
{
32
#endif
33
49
typedef
struct
sEthernetSocket*
EthernetSocket
;
50
59
void
60
Ethernet_getInterfaceMACAddress
(
char
* interfaceId, uint8_t* addr);
61
69
EthernetSocket
70
Ethernet_createSocket
(
char
* interfaceId, uint8_t* destAddress);
71
77
void
78
Ethernet_destroySocket
(EthernetSocket ethSocket);
79
80
void
81
Ethernet_sendPacket
(EthernetSocket ethSocket, uint8_t* buffer,
int
packetSize);
82
83
/*
84
* \brief set a protocol filter for the specified etherType
85
*
86
* \param ethSocket the ethernet socket handle
87
* \param etherType the ether type of messages to accept
88
*/
89
void
90
Ethernet_setProtocolFilter
(EthernetSocket ethSocket, uint16_t etherType);
91
101
int
102
Ethernet_receivePacket
(EthernetSocket ethSocket, uint8_t* buffer,
int
bufferSize);
103
109
bool
110
Ethernet_isSupported
(
void
);
111
116
#ifdef __cplusplus
117
}
118
#endif
119
120
#endif
/* ETHERNET_HAL_H_ */
Generated on Mon Feb 9 2015 11:48:53 for libIEC61850 by
1.8.4