*nix Documentation Project
·  Home
 +   man pages
·  Linux HOWTOs
·  FreeBSD Tips
·  *niX Forums

  man pages->FreeBSD man pages -> ng_h4 (4)              
Title
Content
Arch
Section
 

NG_H4(4)

Contents


NAME    [Toc]    [Back]

     ng_h4 -- Netgraph node type that is also an H4 line discipline

SYNOPSIS    [Toc]    [Back]

     #include <sys/types.h>
     #include <netgraph/bluetooth/include/ng_h4.h>

DESCRIPTION    [Toc]    [Back]

     The h4 node type is both a persistent Netgraph node type and a H4 line
     discipline.  It implements a Bluetooth HCI UART transport layer as per
     chapter H4 of the Bluetooth Specification Book v1.1.  A new node is created
 when the corresponding line discipline, H4DISC, is registered on a
     tty device (see tty(4)).

     The node has a single hook called hook.  Incoming bytes received on the
     tty device are re-assembled into HCI frames (according to the length).
     Full HCI frames are sent out on the hook.	HCI frames received on hook
     are transmitted out on the tty device.  No modification to the data is
     performed in either direction.  While the line discipline is installed on
     a tty, the normal read and write operations are unavailable, returning
     EIO.

     Information about the node is available via the netgraph ioctl(2) command
     NGIOCGINFO.  This command returns a struct nodeinfo similar to the
     NGM_NODEINFO netgraph(4) control message.

HOOKS    [Toc]    [Back]

     This node type supports the following hooks:

     hook    single HCI frame contained in single mbuf structure.

CONTROL MESSAGES    [Toc]    [Back]

     This node type supports the generic control messages, plus the following:

     NGM_H4_NODE_RESET
	     Reset the node.

     NGM_H4_NODE_GET_STATE
	     Returns current receiving state for the node.

     NGM_H4_NODE_GET_DEBUG
	     Returns an integer containing the current debug level for the
	     node.

     NGM_H4_NODE_SET_DEBUG
	     This command takes an integer argument and sets current debug
	     level for the node.

     NGM_H4_NODE_GET_QLEN
	     Returns current length of outgoing queue for the node.

     NGM_H4_NODE_SET_QLEN
	     This command takes an integer argument and sets maximum length of
	     outgoing queue for the node.

     NGM_H4_NODE_GET_STAT
	     Returns various statistic information for the node, such as: number
 of bytes (frames) sent, number of bytes (frames) received and
	     number of input (output) errors.

     NGM_H4_NODE_RESET_STAT
	     Reset all statistic counters to zero.

SHUTDOWN    [Toc]    [Back]

     This node shuts down when the corresponding device is closed (or the line
     discipline is uninstalled on the device).

BUGS    [Toc]    [Back]

     This node still uses spltty(9) to lock tty layer.	This is wrong.

SEE ALSO    [Toc]    [Back]

      
      
     ioctl(2), netgraph(4), tty(4), ngctl(8)

HISTORY    [Toc]    [Back]

     The h4 node type was implemented in FreeBSD 5.0.

AUTHORS    [Toc]    [Back]

     Maksim Yevmenkin <[email protected]>


FreeBSD 5.2.1			 June 14, 2002			 FreeBSD 5.2.1
[ Back ]
 Similar pages
Name OS Title
ng_tty FreeBSD netgraph node type that is also a line discipline
ng_atm FreeBSD netgraph ATM node type
ng_UI FreeBSD UI netgraph node type
ng_uni FreeBSD netgraph UNI node type
ng_hole FreeBSD netgraph discard node type
ng_rfc1490 FreeBSD RFC 1490 netgraph node type
ng_ppp FreeBSD PPP protocol netgraph node type
ng_ether FreeBSD Ethernet netgraph node type
ng_sscop FreeBSD netgraph SSCOP node type
ng_ip_input FreeBSD netgraph IP input node type
Copyright © 2004-2005 DeniX Solutions SRL
newsletter delivery service