Dependencies: FatFileSystem mbed WeatherMeters SDFileSystem
network.h@0:1a61c61d0845, 2012-04-03 (annotated)
- Committer:
- dcoban
- Date:
- Tue Apr 03 18:43:13 2012 +0000
- Revision:
- 0:1a61c61d0845
Who changed what in which revision?
User | Revision | Line number | New contents of line |
---|---|---|---|
dcoban | 0:1a61c61d0845 | 1 | /* Copyright 2011 Adam Green (http://mbed.org/users/AdamGreen/) |
dcoban | 0:1a61c61d0845 | 2 | |
dcoban | 0:1a61c61d0845 | 3 | Licensed under the Apache License, Version 2.0 (the "License"); |
dcoban | 0:1a61c61d0845 | 4 | you may not use this file except in compliance with the License. |
dcoban | 0:1a61c61d0845 | 5 | You may obtain a copy of the License at |
dcoban | 0:1a61c61d0845 | 6 | |
dcoban | 0:1a61c61d0845 | 7 | http://www.apache.org/licenses/LICENSE-2.0 |
dcoban | 0:1a61c61d0845 | 8 | |
dcoban | 0:1a61c61d0845 | 9 | Unless required by applicable law or agreed to in writing, software |
dcoban | 0:1a61c61d0845 | 10 | distributed under the License is distributed on an "AS IS" BASIS, |
dcoban | 0:1a61c61d0845 | 11 | WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. |
dcoban | 0:1a61c61d0845 | 12 | See the License for the specific language governing permissions and |
dcoban | 0:1a61c61d0845 | 13 | limitations under the License. |
dcoban | 0:1a61c61d0845 | 14 | */ |
dcoban | 0:1a61c61d0845 | 15 | /* Header file for core lwIP ethernet functionality. */ |
dcoban | 0:1a61c61d0845 | 16 | #ifndef NETWORK_H_ |
dcoban | 0:1a61c61d0845 | 17 | #define NETWORK_H_ |
dcoban | 0:1a61c61d0845 | 18 | |
dcoban | 0:1a61c61d0845 | 19 | #include <mbed.h> |
dcoban | 0:1a61c61d0845 | 20 | #include "lwip/dhcp.h" |
dcoban | 0:1a61c61d0845 | 21 | |
dcoban | 0:1a61c61d0845 | 22 | |
dcoban | 0:1a61c61d0845 | 23 | |
dcoban | 0:1a61c61d0845 | 24 | // Structure which stores information about the network stack. |
dcoban | 0:1a61c61d0845 | 25 | struct SNetwork |
dcoban | 0:1a61c61d0845 | 26 | { |
dcoban | 0:1a61c61d0845 | 27 | // Timers used to determine when various network maintenance tasks should |
dcoban | 0:1a61c61d0845 | 28 | // be executed. |
dcoban | 0:1a61c61d0845 | 29 | Timer ARP; |
dcoban | 0:1a61c61d0845 | 30 | Timer DHCPCoarse; |
dcoban | 0:1a61c61d0845 | 31 | Timer DHCPFine; |
dcoban | 0:1a61c61d0845 | 32 | Timer TCP; |
dcoban | 0:1a61c61d0845 | 33 | Timer DNS; |
dcoban | 0:1a61c61d0845 | 34 | // Object used to track the DHCP state. |
dcoban | 0:1a61c61d0845 | 35 | dhcp DHCP; |
dcoban | 0:1a61c61d0845 | 36 | // The structure used to represent the LPC17xx polled Ethernet interface. |
dcoban | 0:1a61c61d0845 | 37 | netif EthernetInterface; |
dcoban | 0:1a61c61d0845 | 38 | }; |
dcoban | 0:1a61c61d0845 | 39 | |
dcoban | 0:1a61c61d0845 | 40 | |
dcoban | 0:1a61c61d0845 | 41 | // Function prototypes. |
dcoban | 0:1a61c61d0845 | 42 | int SNetwork_Init(SNetwork* pNetwork, |
dcoban | 0:1a61c61d0845 | 43 | const char* pIPAddress, |
dcoban | 0:1a61c61d0845 | 44 | const char* pSubnetMask, |
dcoban | 0:1a61c61d0845 | 45 | const char* pGatewayAddress, |
dcoban | 0:1a61c61d0845 | 46 | const char* pHostName); |
dcoban | 0:1a61c61d0845 | 47 | int SNetwork_Poll(SNetwork* pNetwork); |
dcoban | 0:1a61c61d0845 | 48 | void SNetwork_PrintAddress(ip_addr_t* pAddress); |
dcoban | 0:1a61c61d0845 | 49 | |
dcoban | 0:1a61c61d0845 | 50 | |
dcoban | 0:1a61c61d0845 | 51 | |
dcoban | 0:1a61c61d0845 | 52 | #endif /* NETWORK_H_ */ |