1a45056e35c1af2a0f0a6eed258fd5fdf4846a79fDaniel Drown/* 2a45056e35c1af2a0f0a6eed258fd5fdf4846a79fDaniel Drown * Copyright 2011 Daniel Drown 3a45056e35c1af2a0f0a6eed258fd5fdf4846a79fDaniel Drown * 4a45056e35c1af2a0f0a6eed258fd5fdf4846a79fDaniel Drown * Licensed under the Apache License, Version 2.0 (the "License"); 5a45056e35c1af2a0f0a6eed258fd5fdf4846a79fDaniel Drown * you may not use this file except in compliance with the License. 6a45056e35c1af2a0f0a6eed258fd5fdf4846a79fDaniel Drown * You may obtain a copy of the License at 7a45056e35c1af2a0f0a6eed258fd5fdf4846a79fDaniel Drown * 8a45056e35c1af2a0f0a6eed258fd5fdf4846a79fDaniel Drown * http://www.apache.org/licenses/LICENSE-2.0 9a45056e35c1af2a0f0a6eed258fd5fdf4846a79fDaniel Drown * 10a45056e35c1af2a0f0a6eed258fd5fdf4846a79fDaniel Drown * Unless required by applicable law or agreed to in writing, software 11a45056e35c1af2a0f0a6eed258fd5fdf4846a79fDaniel Drown * distributed under the License is distributed on an "AS IS" BASIS, 12a45056e35c1af2a0f0a6eed258fd5fdf4846a79fDaniel Drown * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 13a45056e35c1af2a0f0a6eed258fd5fdf4846a79fDaniel Drown * See the License for the specific language governing permissions and 14a45056e35c1af2a0f0a6eed258fd5fdf4846a79fDaniel Drown * limitations under the License. 15a45056e35c1af2a0f0a6eed258fd5fdf4846a79fDaniel Drown * 16a45056e35c1af2a0f0a6eed258fd5fdf4846a79fDaniel Drown * getaddr.h - get a locally configured address 17a45056e35c1af2a0f0a6eed258fd5fdf4846a79fDaniel Drown */ 18a45056e35c1af2a0f0a6eed258fd5fdf4846a79fDaniel Drown#ifndef __GETADDR_H__ 19a45056e35c1af2a0f0a6eed258fd5fdf4846a79fDaniel Drown#define __GETADDR_H__ 20a45056e35c1af2a0f0a6eed258fd5fdf4846a79fDaniel Drown 21a45056e35c1af2a0f0a6eed258fd5fdf4846a79fDaniel Drownunion anyip { 22a45056e35c1af2a0f0a6eed258fd5fdf4846a79fDaniel Drown struct in6_addr ip6; 23a45056e35c1af2a0f0a6eed258fd5fdf4846a79fDaniel Drown struct in_addr ip4; 24a45056e35c1af2a0f0a6eed258fd5fdf4846a79fDaniel Drown}; 25a45056e35c1af2a0f0a6eed258fd5fdf4846a79fDaniel Drown 26a45056e35c1af2a0f0a6eed258fd5fdf4846a79fDaniel Drownunion anyip *getinterface_ip(const char *interface, int family); 27a45056e35c1af2a0f0a6eed258fd5fdf4846a79fDaniel Drown 28a45056e35c1af2a0f0a6eed258fd5fdf4846a79fDaniel Drown#endif 29