Sending the Setup Message to the PIC

Finally, the application creates the setup message and sends it to the PIC.

Structures this code references are defined in the jnx-gateway-msg.h file (in the sdk/junos/examples/src/include/jnx directory) and contain information for:

The code makes this call:

                                  pgre_session->pdata_pic, pgre_session);

    return EOK;

jnx_gw_ctrl_fill_data_pic_msg() is in the jnx-gateway_ctrl_data.c file. It fills a send buffer (pointed to by send_buf) with the message for the data PIC (the PIC is pointed to by pdata_pic). It then makes various checks and calls the pconn_client_send() function in the libconn library to send the message if it survives the checks:

 /* only valid messages */
        if (pdata_pic->cur_len != sizeof(*hdr))  {

            hdr->msg_len = htons(pdata_pic->cur_len);

            pconn_client_send(pdata_pic->pic_data_conn, hdr->msg_type,
                              pdata_pic->send_buf, pdata_pic->cur_len);

Processing the Packet on the PIC

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:26:47 2010 for Juniper Networks Partner Solution Development Platform JUNOS SDK 10.2R1 by Doxygen 1.4.5