NetworkSocketAPI
Dependents: HelloWizFi250Interface
Fork of NetworkSocketAPI by
NetworkInterface.cpp@60:0360cb987da3, 2016-02-25 (annotated)
- Committer:
- Christopher Haster
- Date:
- Thu Feb 25 22:02:08 2016 -0600
- Revision:
- 60:0360cb987da3
- Parent:
- 59:badee747a030
Removed getNetworkMask/getGateway
Who changed what in which revision?
User | Revision | Line number | New contents of line |
---|---|---|---|
Christopher Haster |
23:1e86d9fb3d86 | 1 | /* NetworkInterface Base Class |
Christopher Haster |
23:1e86d9fb3d86 | 2 | * Copyright (c) 2015 ARM Limited |
Christopher Haster |
23:1e86d9fb3d86 | 3 | * |
Christopher Haster |
23:1e86d9fb3d86 | 4 | * Licensed under the Apache License, Version 2.0 (the "License"); |
Christopher Haster |
23:1e86d9fb3d86 | 5 | * you may not use this file except in compliance with the License. |
Christopher Haster |
23:1e86d9fb3d86 | 6 | * You may obtain a copy of the License at |
Christopher Haster |
23:1e86d9fb3d86 | 7 | * |
Christopher Haster |
23:1e86d9fb3d86 | 8 | * http://www.apache.org/licenses/LICENSE-2.0 |
Christopher Haster |
23:1e86d9fb3d86 | 9 | * |
Christopher Haster |
23:1e86d9fb3d86 | 10 | * Unless required by applicable law or agreed to in writing, software |
Christopher Haster |
23:1e86d9fb3d86 | 11 | * distributed under the License is distributed on an "AS IS" BASIS, |
Christopher Haster |
23:1e86d9fb3d86 | 12 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. |
Christopher Haster |
23:1e86d9fb3d86 | 13 | * See the License for the specific language governing permissions and |
Christopher Haster |
23:1e86d9fb3d86 | 14 | * limitations under the License. |
Christopher Haster |
23:1e86d9fb3d86 | 15 | */ |
Christopher Haster |
23:1e86d9fb3d86 | 16 | |
Christopher Haster |
23:1e86d9fb3d86 | 17 | #include "NetworkInterface.h" |
geky | 31:7f15b95f2a1d | 18 | #include "DnsQuery.h" |
Christopher Haster |
23:1e86d9fb3d86 | 19 | |
Christopher Haster |
23:1e86d9fb3d86 | 20 | |
geky | 30:3cc78f5db99d | 21 | bool NetworkInterface::isConnected() |
geky | 30:3cc78f5db99d | 22 | { |
Christopher Haster |
23:1e86d9fb3d86 | 23 | return getIPAddress() != 0; |
Christopher Haster |
23:1e86d9fb3d86 | 24 | } |
Christopher Haster |
23:1e86d9fb3d86 | 25 | |
geky | 31:7f15b95f2a1d | 26 | int32_t NetworkInterface::getHostByName(const char *name, char *ip) |
geky | 31:7f15b95f2a1d | 27 | { |
geky | 56:19c9e332c0f1 | 28 | return dnsQuery(this, name, ip); |
geky | 31:7f15b95f2a1d | 29 | } |