HP rp5450 HP DLPI Programmer's Guide - Page 217
dl_bind_ack_t, bind_ack = dl_bind_ack_t *ctl_area
View all HP rp5450 manuals
Add to My Manuals
Save this manual to your list of manuals |
Page 217 highlights
Sample Programs Raw Mode Example exit(1); } } /*-=-* open file descriptor and attach *-=-*/ int dl_open(ppa) int ppa; { int fd; dl_attach_req_t *attach_req = (dl_attach_req_t *)ctl_area; if((fd = open("/dev/dlpi", O_RDWR)) == -1) { printf("%s,dl_open: open failed, errno = %d\n",tag, errno); exit(1); } attach_req->dl_primitive = DL_ATTACH_REQ; attach_req->dl_ppa = ppa; put_ctrl(fd, sizeof(dl_attach_req_t), 0); get_msg(fd); check_ctrl(DL_OK_ACK); return(fd); } /*-=-* send DL_BIND_REQ *-=-*/ void dl_bind(fd, sap, addr) int fd, sap; u_char *addr; { dl_bind_req_t *bind_req = (dl_bind_req_t *)ctl_area; dl_bind_ack_t *bind_ack = (dl_bind_ack_t *)ctl_area; bind_req->dl_primitive = DL_BIND_REQ; bind_req->dl_sap = sap; bind_req->dl_max_conind = 1; bind_req->dl_service_mode = DL_HP_RAWDLS; bind_req->dl_conn_mgmt = 0; bind_req->dl_xidtest_flg = 0; put_ctrl(fd, sizeof(dl_bind_req_t), 0); get_msg(fd); check_ctrl(DL_BIND_ACK); Appendix A 217