Deniz Coban / Mbed 2 deprecated Deneme

Dependencies:   FatFileSystem mbed WeatherMeters SDFileSystem

Embed: (wiki syntax)

« Back to documentation index

Show/hide line numbers network.h Source File

network.h

00001 /* Copyright 2011 Adam Green (http://mbed.org/users/AdamGreen/)
00002 
00003    Licensed under the Apache License, Version 2.0 (the "License");
00004    you may not use this file except in compliance with the License.
00005    You may obtain a copy of the License at
00006 
00007        http://www.apache.org/licenses/LICENSE-2.0
00008 
00009    Unless required by applicable law or agreed to in writing, software
00010    distributed under the License is distributed on an "AS IS" BASIS,
00011    WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
00012    See the License for the specific language governing permissions and
00013    limitations under the License.
00014 */
00015 /* Header file for core lwIP ethernet functionality. */
00016 #ifndef NETWORK_H_
00017 #define NETWORK_H_
00018 
00019 #include <mbed.h>
00020 #include "lwip/dhcp.h "
00021 
00022 
00023 
00024 // Structure which stores information about the network stack.
00025 struct SNetwork
00026 {
00027     // Timers used to determine when various network maintenance tasks should
00028     // be executed.
00029     Timer           ARP;
00030     Timer           DHCPCoarse;
00031     Timer           DHCPFine;
00032     Timer           TCP;
00033     Timer           DNS;
00034     // Object used to track the DHCP state.
00035     dhcp            DHCP;
00036     // The structure used to represent the LPC17xx polled Ethernet interface.
00037     netif           EthernetInterface;
00038 };
00039 
00040 
00041 // Function prototypes.
00042 int      SNetwork_Init(SNetwork*   pNetwork,
00043                        const char* pIPAddress,
00044                        const char* pSubnetMask,
00045                        const char* pGatewayAddress,
00046                        const char* pHostName);
00047 int     SNetwork_Poll(SNetwork* pNetwork);
00048 void    SNetwork_PrintAddress(ip_addr_t* pAddress);
00049 
00050 
00051 
00052 #endif /* NETWORK_H_ */