Path: blob/buildjre8/ios-missing-include/netinet/in_var.h
861 views
/*1* Copyright (c) 2000-2019 Apple Inc. All rights reserved.2*3* @APPLE_OSREFERENCE_LICENSE_HEADER_START@4*5* This file contains Original Code and/or Modifications of Original Code6* as defined in and that are subject to the Apple Public Source License7* Version 2.0 (the 'License'). You may not use this file except in8* compliance with the License. The rights granted to you under the License9* may not be used to create, or enable the creation or redistribution of,10* unlawful or unlicensed copies of an Apple operating system, or to11* circumvent, violate, or enable the circumvention or violation of, any12* terms of an Apple operating system software license agreement.13*14* Please obtain a copy of the License at15* http://www.opensource.apple.com/apsl/ and read it before using this file.16*17* The Original Code and all software distributed under the License are18* distributed on an 'AS IS' basis, WITHOUT WARRANTY OF ANY KIND, EITHER19* EXPRESS OR IMPLIED, AND APPLE HEREBY DISCLAIMS ALL SUCH WARRANTIES,20* INCLUDING WITHOUT LIMITATION, ANY WARRANTIES OF MERCHANTABILITY,21* FITNESS FOR A PARTICULAR PURPOSE, QUIET ENJOYMENT OR NON-INFRINGEMENT.22* Please see the License for the specific language governing rights and23* limitations under the License.24*25* @APPLE_OSREFERENCE_LICENSE_HEADER_END@26*/27/*28* Copyright (c) 1985, 1986, 199329* The Regents of the University of California. All rights reserved.30*31* Redistribution and use in source and binary forms, with or without32* modification, are permitted provided that the following conditions33* are met:34* 1. Redistributions of source code must retain the above copyright35* notice, this list of conditions and the following disclaimer.36* 2. Redistributions in binary form must reproduce the above copyright37* notice, this list of conditions and the following disclaimer in the38* documentation and/or other materials provided with the distribution.39* 3. All advertising materials mentioning features or use of this software40* must display the following acknowledgement:41* This product includes software developed by the University of42* California, Berkeley and its contributors.43* 4. Neither the name of the University nor the names of its contributors44* may be used to endorse or promote products derived from this software45* without specific prior written permission.46*47* THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS ``AS IS'' AND48* ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE49* IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE50* ARE DISCLAIMED. IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE51* FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL52* DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS53* OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)54* HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT55* LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY56* OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF57* SUCH DAMAGE.58*59* @(#)in_var.h 8.2 (Berkeley) 1/9/9560*/6162#ifndef _NETINET_IN_VAR_H_63#define _NETINET_IN_VAR_H_64#include <sys/appleapiopts.h>6566#include <sys/queue.h>67#include <sys/kern_event.h>68#include <net/net_kev.h>697071struct in_aliasreq {72char ifra_name[IFNAMSIZ]; /* if name, e.g. "en0" */73struct sockaddr_in ifra_addr;74struct sockaddr_in ifra_broadaddr;75#define ifra_dstaddr ifra_broadaddr76struct sockaddr_in ifra_mask;77};7879/*80* Event data, inet style.81*/82struct kev_in_data {83struct net_event_data link_data;84struct in_addr ia_addr; /* interface address */85u_int32_t ia_net; /* network number of interface */86u_int32_t ia_netmask; /* mask of net part */87u_int32_t ia_subnet; /* subnet number, including net */88u_int32_t ia_subnetmask; /* mask of subnet part */89struct in_addr ia_netbroadcast; /* to recognize net broadcasts */90struct in_addr ia_dstaddr;91};9293struct kev_in_collision {94struct net_event_data link_data; /* link where ARP was received on */95struct in_addr ia_ipaddr; /* conflicting IP address */96u_char hw_len; /* length of hardware address */97u_char hw_addr[0]; /* variable length hardware address */98};99100struct kev_in_arpfailure {101struct net_event_data link_data; /* link where ARP is being sent */102};103104struct kev_in_arpalive {105struct net_event_data link_data; /* link where ARP was received */106};107108109#ifdef __APPLE_API_PRIVATE110struct kev_in_portinuse {111u_int16_t port; /* conflicting port number in host order */112u_int32_t req_pid; /* PID port requestor */113u_int32_t reserved[2];114};115#endif /* __APPLE_API_PRIVATE */116117/* INET6 stuff */118#include <netinet6/in6_var.h>119#endif /* _NETINET_IN_VAR_H_ */120121122