jbuf Struct Reference

Defines the packet format used for a zero-copy handoff between the kernel and user space. More...


Data Fields

jbufjb_next
 Next jbuf in the list.
caddr_t jb_data
 Pointer to the data in this jbuf.
u_int16_t jb_len
 Length of the data in this jbuf.
u_int16_t jb_flags
 Flags.
u_int16_t jb_total_len
 Total length of the packet.
u_int8_t jb_rcv_qn_bits
 Receive Qn bits:4 FC+TCP+PLP.
u_int8_t jb_pad [1]
 Reserved for future use.
u_int8_t jb_svc_id
 Service Id.
u_int8_t jb_pkt_dir
 Packet direction.
u_int16_t jb_svc_set_id
 Service Set Id, valid only if JBUF_FLAG_INTF_MODE flag is set.
u_int32_t jb_rcv_vrf
 Receives VRF.
ifl_idx_t jb_rcvidx
 Receives subunit/incoming interfaces.
u_int32_t jb_hdr_hash
 Represents a 5 way hash table.
u_int32_t jb_l3_hash
 Represents a 3 way hash table.
if_subunit_t jb_xmit_subunit
 Transmits ms-interface subunit.
if_subunit_t jb_rcv_subunit
 Receives ms-interface subunits.
u_int32_t jb_opq_data
 Data relevant to the application.
jbuf_svcs_hdr jb_svcs_hdr
 Internal use only.
volatile u_int32_t jb_ref_count
 Internal use only : Reference Count.
jbufjb_ctrl_next
 Internal use only : List of control buffers pointing to this buf.
jbufjb_ctrl_prev
 Internal use only : List of control buffers pointing to this buf.
caddr_t jb_tx_data
 Internal use only : For transmission purpose.
u_int16_t jb_tx_len
 Internal use only : For transmission purpose.
u_int16_t jb_pool_id
 Internal use only : For global/local jbufs, pool to which buffer belongs.
u_int16_t jb_buf_size
 Internal use only : For jbuf buf size.
u_int16_t jb_plugin_id
 Internal use only : For jbuf alloc plugin id.
uint64_t jb_hw_timestamp
 Represents the timestamp of the packet received by the hardware.
char jb_scratch [JBUF_SCRATCH_SIZE]
 Scratch space for user applications .


Detailed Description

Defines the packet format used for a zero-copy handoff between the kernel and user space.

A packet is made up of one or more jbuf data structures which are all linked together with a singly linked list. Any modifications to the jbuf fields must go through a relevant jbuf API for correctness.

jb_xmit_subunit is an overloaded field. Applications can specify either the outgoing vrf or subunit. If an application wants to specify the outgoing subunit, then Bit-1 of the jb_flag should be 0. If the applications wants to specify the outgoing vrf then Bit-1 of the jb_flag should be 1 (JBUF_FLAG_XMIT_VRF).


The documentation for this struct was generated from the following file:
2007-2009 Juniper Networks, Inc. All rights reserved. The information contained herein is confidential information of Juniper Networks, Inc., and may not be used, disclosed, distributed, modified, or copied without the prior written consent of Juniper Networks, Inc. in an express license. This information is subject to change by Juniper Networks, Inc. Juniper Networks, the Juniper Networks logo, and JUNOS are registered trademarks of Juniper Networks, Inc. in the United States and other countries. All other trademarks, service marks, registered trademarks, or registered service marks are the property of their respective owners.
Generated on Sun May 30 20:24:47 2010 for libmp-sdk by Doxygen 1.4.5