ng_h4_var.h (140065) | ng_h4_var.h (171818) |
---|---|
1/* 2 * ng_h4_var.h 3 */ 4 5/*- 6 * Copyright (c) 2001-2002 Maksim Yevmenkin <m_evmenkin@yahoo.com> 7 * All rights reserved. 8 * --- 13 unchanged lines hidden (view full) --- 22 * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL 23 * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS 24 * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) 25 * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT 26 * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY 27 * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF 28 * SUCH DAMAGE. 29 * | 1/* 2 * ng_h4_var.h 3 */ 4 5/*- 6 * Copyright (c) 2001-2002 Maksim Yevmenkin <m_evmenkin@yahoo.com> 7 * All rights reserved. 8 * --- 13 unchanged lines hidden (view full) --- 22 * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL 23 * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS 24 * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) 25 * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT 26 * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY 27 * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF 28 * SUCH DAMAGE. 29 * |
30 * $Id: ng_h4_var.h,v 1.1 2002/11/24 19:46:55 max Exp $ 31 * $FreeBSD: head/sys/netgraph/bluetooth/drivers/h4/ng_h4_var.h 140065 2005-01-11 11:55:56Z glebius $ | 30 * $Id: ng_h4_var.h,v 1.5 2005/10/31 17:57:43 max Exp $ 31 * $FreeBSD: head/sys/netgraph/bluetooth/drivers/h4/ng_h4_var.h 171818 2007-08-13 17:19:28Z emax $ |
32 * 33 * Based on: 34 * --------- 35 * 36 * FreeBSD: src/sys/netgraph/ng_tty.h 37 * Author: Archie Cobbs <archie@freebsd.org> 38 */ 39 --- 24 unchanged lines hidden (view full) --- 64/* 65 * Per-node private info 66 */ 67 68typedef struct ng_h4_info { 69 struct tty *tp; /* Terminal device */ 70 node_p node; /* Netgraph node */ 71 | 32 * 33 * Based on: 34 * --------- 35 * 36 * FreeBSD: src/sys/netgraph/ng_tty.h 37 * Author: Archie Cobbs <archie@freebsd.org> 38 */ 39 --- 24 unchanged lines hidden (view full) --- 64/* 65 * Per-node private info 66 */ 67 68typedef struct ng_h4_info { 69 struct tty *tp; /* Terminal device */ 70 node_p node; /* Netgraph node */ 71 |
72 u_int32_t flags; /* Flags */ 73#define NG_H4_TIMEOUT (1 << 0) /* A timeout is pending */ 74 | |
75 ng_h4_node_debug_ep debug; /* Debug level */ 76 ng_h4_node_state_ep state; /* State */ | 72 ng_h4_node_debug_ep debug; /* Debug level */ 73 ng_h4_node_state_ep state; /* State */ |
77 | 74 |
78 ng_h4_node_stat_ep stat; 79#define NG_H4_STAT_PCKTS_SENT(s) (s).pckts_sent ++ 80#define NG_H4_STAT_BYTES_SENT(s, n) (s).bytes_sent += (n) 81#define NG_H4_STAT_PCKTS_RECV(s) (s).pckts_recv ++ 82#define NG_H4_STAT_BYTES_RECV(s, n) (s).bytes_recv += (n) 83#define NG_H4_STAT_OERROR(s) (s).oerrors ++ 84#define NG_H4_STAT_IERROR(s) (s).ierrors ++ 85#define NG_H4_STAT_RESET(s) bzero(&(s), sizeof((s))) 86 | 75 ng_h4_node_stat_ep stat; 76#define NG_H4_STAT_PCKTS_SENT(s) (s).pckts_sent ++ 77#define NG_H4_STAT_BYTES_SENT(s, n) (s).bytes_sent += (n) 78#define NG_H4_STAT_PCKTS_RECV(s) (s).pckts_recv ++ 79#define NG_H4_STAT_BYTES_RECV(s, n) (s).bytes_recv += (n) 80#define NG_H4_STAT_OERROR(s) (s).oerrors ++ 81#define NG_H4_STAT_IERROR(s) (s).ierrors ++ 82#define NG_H4_STAT_RESET(s) bzero(&(s), sizeof((s))) 83 |
87 ng_bt_mbufq_t outq; /* Queue of outgoing mbuf's */ | 84 struct ifqueue outq; /* Queue of outgoing mbuf's */ |
88#define NG_H4_DEFAULTQLEN 12 /* XXX max number of mbuf's in outq */ | 85#define NG_H4_DEFAULTQLEN 12 /* XXX max number of mbuf's in outq */ |
86#define NG_H4_LOCK(sc) IF_LOCK(&sc->outq) 87#define NG_H4_UNLOCK(sc) IF_UNLOCK(&sc->outq) |
|
89 90#define NG_H4_IBUF_SIZE 1024 /* XXX must be big enough to hold full 91 frame */ 92 u_int8_t ibuf[NG_H4_IBUF_SIZE]; /* Incoming data */ 93 u_int32_t got; /* Number of bytes we have received */ 94 u_int32_t want; /* Number of bytes we want to receive */ 95 96 hook_p hook; /* Upstream hook */ 97 struct callout timo; /* See man timeout(9) */ | 88 89#define NG_H4_IBUF_SIZE 1024 /* XXX must be big enough to hold full 90 frame */ 91 u_int8_t ibuf[NG_H4_IBUF_SIZE]; /* Incoming data */ 92 u_int32_t got; /* Number of bytes we have received */ 93 u_int32_t want; /* Number of bytes we want to receive */ 94 95 hook_p hook; /* Upstream hook */ 96 struct callout timo; /* See man timeout(9) */ |
97 98 u_int8_t dying; /* are we dying? */ |
|
98} ng_h4_info_t; 99typedef ng_h4_info_t * ng_h4_info_p; 100 101#endif /* _NETGRAPH_H4_VAR_H_ */ 102 | 99} ng_h4_info_t; 100typedef ng_h4_info_t * ng_h4_info_p; 101 102#endif /* _NETGRAPH_H4_VAR_H_ */ 103 |