2 * Copyright (C) 1995 Advanced RISC Machines Limited. All rights reserved.
4 * This software may be freely used, copied, modified, and distributed
5 * provided that the above copyright notice is preserved in all copies of the
17 * Title: Private header for channels implementations
20 #ifndef angel_chanpriv_h
21 #define angel_chanpriv_h
24 * This describes the internal structure and flags for a channels packet.
27 /* byte positions within channel packet */
28 #define CF_CHANNEL_BYTE_POS 0
29 #define CF_HOME_SEQ_BYTE_POS 1
30 #define CF_OPPO_SEQ_BYTE_POS 2
31 #define CF_FLAGS_BYTE_POS 3
32 #define CF_DATA_BYTE_POS 4
34 /* flags for FLAGS field */
35 #define CF_RELIABLE (1 << 0) /* use reliable channels protocol */
36 #define CF_RESEND (1 << 1) /* this is a renegotiation packet */
37 #define CF_HEARTBEAT (1 << 2) /* heartbeat packet - prod target into sync */
39 /* byte positions within buffer */
40 #define CB_LINK_BYTE_POS 0 /* the link pointer */
41 #define CB_CHAN_HEADER_BYTE_POS 4 /* the channel frame starts here */
43 /* macro to get buffer position of packet component */
44 #define CB_PACKET(x) (CB_CHAN_HEADER_BYTE_POS + (x))
46 /* byte offset of packet data within buffer */
47 #define CB_CHAN_DATA_BYTE_POS (CB_PACKET(CF_DATA_BYTE_POS))
49 /* access the link in a buffer, where b is byte pointer to buffer */
50 #define CB_LINK(b) ((p_Buffer)(&(b)[0]))
52 #define invalidChannelID(chan) (((int)(chan)) < 0 || \
53 (chan) >= CI_NUM_CHANNELS)
55 #endif /* ndef angel_chanpriv_h */
This page took 0.031507 seconds and 5 git commands to generate.