HP B2355-90138 manual Dlpi Example Program

Page 31

LLA and DLPI Example Programs

DLPI Example Program

data_area[0] = i;

/* Initialize data area */ for (j = 1; j < (i+1)*10; j++)

data_area[j] = ”a”; print_dlsap(”sending data to ”,rdlsap, rdlsap_len);

send_data(send_fd, rdlsap, rdlsap_len, (i + 1) * 10); /* receive the data packet */

recv_len = recv_data(recv_fd);

printf(”received %d bytes, first word = %d\n”, recv_len, data_area[0]);

}

/*

We're finished. Now call cleanup to unbind, then detach, then close the device file.

*/

cleanup(send_fd); cleanup(recv_fd);

}

Chapter 2

31

Image 31
Contents LLA to Dlpi Migration Guide Legal Notices Page Page Contents Contents Printing History Page Preface Page LLA to Dlpi Migration LLA to Dlpi Migration Device Files LLA ioctl req type Dlpi Primitive Ioctl RequestsLogreadtimeout Transmitting Data Receiving Data Receiving Data LLA and Dlpi Example LLA and Dlpi Example Programs Snap SAP Dlpi Example ProgramStruct strbuf databuf = Dlpi Example Program Dlpi Example Program Dlpi Example Program Dlpi Example Program Dlpi Example Program Dlpi Example Program Dlpi Example Program Dlpi Example Program Dlpi Example Program LLA Example Program LLA Example Program LLA Example Program LLA Example Program LLA Example Program LLA Example Program LLA Example Program LLA Example Program LLA Example Program Index