1/*
2 * Copyright (c) 2000 Apple Computer, Inc. All rights reserved.
3 *
4 * @APPLE_LICENSE_HEADER_START@
5 *
6 * This file contains Original Code and/or Modifications of Original Code
7 * as defined in and that are subject to the Apple Public Source License
8 * Version 2.0 (the 'License'). You may not use this file except in
9 * compliance with the License. Please obtain a copy of the License at
10 * http://www.opensource.apple.com/apsl/ and read it before using this
11 * file.
12 *
13 * The Original Code and all software distributed under the License are
14 * distributed on an 'AS IS' basis, WITHOUT WARRANTY OF ANY KIND, EITHER
15 * EXPRESS OR IMPLIED, AND APPLE HEREBY DISCLAIMS ALL SUCH WARRANTIES,
16 * INCLUDING WITHOUT LIMITATION, ANY WARRANTIES OF MERCHANTABILITY,
17 * FITNESS FOR A PARTICULAR PURPOSE, QUIET ENJOYMENT OR NON-INFRINGEMENT.
18 * Please see the License for the specific language governing rights and
19 * limitations under the License.
20 *
21 * @APPLE_LICENSE_HEADER_END@
22 */
23
24#ifndef __ACSP_H__
25#define __ACSP_H__
26
27// ACSP payload dumping macros... for use within acsp_data_printpkt only
28#define ACSP_PRINT_PAYLOAD(payload_name, flag_names...)															\
29	(payload_name)?																								\
30		printer(arg, " <payload len %d, packet seq %d, %s, flags:%s%s%s%s>",  len, pkt->seq, payload_name, ## flag_names) :	\
31		printer(arg, " <payload len %d, packet seq %d, CI_TYPE %d, flags:%s%s%s%s>", len, pkt->seq, pkt->type, ## flag_names)
32
33#define ACSP_PRINTPKT_PAYLOAD(payload_name)												\
34	ACSP_PRINT_PAYLOAD(payload_name,													\
35						((flags & ACSP_FLAG_START) != 0)? " START" : "",				\
36						((flags & ACSP_FLAG_END) != 0)? " END" : "",					\
37						((flags & ACSP_FLAG_REQUIRE_ACK) != 0)? " REQUIRE-ACK" : "",	\
38						((flags & ACSP_FLAG_ACK) != 0)? " ACK" : "")
39
40//
41// ACSP function prototypes
42//
43void acsp_start(int mtu);
44void acsp_stop(void);
45void acsp_init_plugins(void *arg, uintptr_t phase);
46
47void acsp_data_input(int unit, u_char *pkt, int len);
48int acsp_printpkt(u_char *, int, void (*) __P((void *, char *, ...)), void *);
49
50
51#endif