HP rp7440 HP DLPI Programmer's Guide - Page 203
Connectionless Mode Example, RESERVED. NO PART OF THIS PROGRAM MAY BE PHOTOCOPIED
View all HP rp7440 manuals
Add to My Manuals
Save this manual to your list of manuals |
Page 203 highlights
Sample Programs Connectionless Mode Example Connectionless Mode Example B.11.23_ic60 (C) COPYRIGHT HEWLETT-PACKARD DEVELOPMENT COMPANY L.P. 2003. ALL RIGHTS RESERVED. NO PART OF THIS PROGRAM MAY BE PHOTOCOPIED, REPRODUCED, OR TRANSLATED TO ANOTHER PROGRAM LANGUAGE WITHOUT THE PRIOR WRITTEN CONSENT OF HEWLETT PACKARD COMPANY The main part of this program is composed of two parts. The first part demonstrates data transfer over a connectionless stream with LLC SAP headers. The second part of this program demonstrates data transfer over a connectionless stream with LLC SNAP headers #include #include #include #include #include #include #include #include #define SEND_SAP #define RECV_SAP #define SNAP_SAP 0x80 0x82 0xAA /* sending SAP */ /* receiving SAP */ /* SNAP SAP */ SNAP protocol values u_char SEND_SNAP_SAP[5] = {0x50, 0x00, 0x00, 0x00, 0x00}; u_char RECV_SNAP_SAP[5] = {0x60, 0x00, 0x00, 0x00, 0x00}; global areas for sending and receiving messages define AREA_SIZE 5000/* bytes; big enough for largest possible msg */ #define LONG_AREA_SIZE(AREA_SIZE / sizeof(u_long)) /* AREA_SIZE / 4 */ Appendix A 203