X-Git-Url: https://git.saurik.com/apple/xnu.git/blobdiff_plain/6601e61aa18bf4f09af135ff61fc7f4771d23b06..bca245acd4c03fd752d1a45f011ad495e60fe53d:/bsd/net/firewire.h?ds=sidebyside diff --git a/bsd/net/firewire.h b/bsd/net/firewire.h index d5520fe10..dfa51cb7e 100644 --- a/bsd/net/firewire.h +++ b/bsd/net/firewire.h @@ -1,23 +1,29 @@ /* * Copyright (c) 2003 Apple Computer, Inc. All rights reserved. * - * @APPLE_LICENSE_HEADER_START@ - * - * The contents of this file constitute Original Code as defined in and - * are subject to the Apple Public Source License Version 1.1 (the - * "License"). You may not use this file except in compliance with the - * License. Please obtain a copy of the License at - * http://www.apple.com/publicsource and read it before using this file. - * - * This Original Code and all software distributed under the License are - * distributed on an "AS IS" basis, WITHOUT WARRANTY OF ANY KIND, EITHER + * @APPLE_OSREFERENCE_LICENSE_HEADER_START@ + * + * This file contains Original Code and/or Modifications of Original Code + * as defined in and that are subject to the Apple Public Source License + * Version 2.0 (the 'License'). You may not use this file except in + * compliance with the License. The rights granted to you under the License + * may not be used to create, or enable the creation or redistribution of, + * unlawful or unlicensed copies of an Apple operating system, or to + * circumvent, violate, or enable the circumvention or violation of, any + * terms of an Apple operating system software license agreement. + * + * Please obtain a copy of the License at + * http://www.opensource.apple.com/apsl/ and read it before using this file. + * + * The Original Code and all software distributed under the License are + * distributed on an 'AS IS' basis, WITHOUT WARRANTY OF ANY KIND, EITHER * EXPRESS OR IMPLIED, AND APPLE HEREBY DISCLAIMS ALL SUCH WARRANTIES, * INCLUDING WITHOUT LIMITATION, ANY WARRANTIES OF MERCHANTABILITY, - * FITNESS FOR A PARTICULAR PURPOSE OR NON-INFRINGEMENT. Please see the - * License for the specific language governing rights and limitations - * under the License. - * - * @APPLE_LICENSE_HEADER_END@ + * FITNESS FOR A PARTICULAR PURPOSE, QUIET ENJOYMENT OR NON-INFRINGEMENT. + * Please see the License for the specific language governing rights and + * limitations under the License. + * + * @APPLE_OSREFERENCE_LICENSE_HEADER_END@ */ /* * Fundamental constants relating to FireWire network device. @@ -31,32 +37,32 @@ /* * The number of bytes in a FireWire EUI-64. */ -#define FIREWIRE_EUI64_LEN 8 +#define FIREWIRE_EUI64_LEN 8 /* * The number of bytes in the type field. */ -#define FIREWIRE_TYPE_LEN 2 +#define FIREWIRE_TYPE_LEN 2 /* * The length of the header provided by the FireWire network device. */ -#define FIREWIRE_HDR_LEN (FIREWIRE_EUI64_LEN*2+FIREWIRE_TYPE_LEN) +#define FIREWIRE_HDR_LEN (FIREWIRE_EUI64_LEN*2+FIREWIRE_TYPE_LEN) /* * The minimum packet length. */ -#define FIREWIRE_MIN_LEN 64 +#define FIREWIRE_MIN_LEN 64 /* * The maximum packet length. */ -#define FIREWIRE_MAX_LEN 4096 +#define FIREWIRE_MAX_LEN 4096 /* * A macro to validate a length with */ -#define FIREWIRE_IS_VALID_LEN(foo) \ +#define FIREWIRE_IS_VALID_LEN(foo) \ ((foo) >= FIREWIRE_MIN_LEN && (foo) <= FIREWIRE_MAX_LEN) /* @@ -65,16 +71,16 @@ * The device uses a simplified header with just the non-changing * EUI-64 addresses and ethernet type specified; */ -struct firewire_header { - u_char firewire_dhost[FIREWIRE_EUI64_LEN]; - u_char firewire_shost[FIREWIRE_EUI64_LEN]; - u_short firewire_type; /* ethertype */ +struct firewire_header { + u_char firewire_dhost[FIREWIRE_EUI64_LEN]; + u_char firewire_shost[FIREWIRE_EUI64_LEN]; + u_short firewire_type; /* ethertype */ }; /* * Format of FireWire EUI-64. */ -struct firewire_eui64 { +struct firewire_eui64 { u_char octet[FIREWIRE_EUI64_LEN]; }; @@ -82,17 +88,17 @@ struct firewire_eui64 { * Format of FireWire hardware address. */ struct firewire_address { - u_char eui64[FIREWIRE_EUI64_LEN]; - u_char maxRec; - u_char spd; - u_int16_t unicastFifoHi; - u_int32_t unicastFifoLo; + u_char eui64[FIREWIRE_EUI64_LEN]; + u_char maxRec; + u_char spd; + u_int16_t unicastFifoHi; + u_int32_t unicastFifoLo; }; -#define FIREWIRE_ADDR_LEN 16 /* sizeof(struct firewire_address) */ +#define FIREWIRE_ADDR_LEN 16 /* sizeof(struct firewire_address) */ -#define FIREWIRE_MTU (FIREWIRE_MAX_LEN - FIREWIRE_HDR_LEN) -#define FIREWIRE_MIN (FIREWIRE_MIN_LEN - FIREWIRE_HDR_LEN) +#define FIREWIRE_MTU (FIREWIRE_MAX_LEN - FIREWIRE_HDR_LEN) +#define FIREWIRE_MIN (FIREWIRE_MIN_LEN - FIREWIRE_HDR_LEN) #endif /* !_NET_FIREWIRE_H_ */