From: chas w. <ch...@us...> - 2003-07-19 22:42:05
|
Update of /cvsroot/linux-atm/linux-atm/src/led In directory sc8-pr-cvs1:/tmp/cvs-serv18685 Modified Files: Tag: V2_5_0 address.c conn.c display.c frames.c join.c kernel.c main.c Log Message: remove extra \n's from diag() Index: address.c =================================================================== RCS file: /cvsroot/linux-atm/linux-atm/src/led/address.c,v retrieving revision 1.2 retrieving revision 1.2.2.1 diff -C2 -d -r1.2 -r1.2.2.1 *** address.c 9 Oct 2001 22:33:07 -0000 1.2 --- address.c 19 Jul 2003 22:42:01 -0000 1.2.2.1 *************** *** 53,57 **** fd = socket(PF_ATMSVC, SOCK_DGRAM, 0); if (fd < 0) { ! diag(COMPONENT, DIAG_ERROR, "addr_getesi: socket: %s\n", strerror(errno)); return -1; --- 53,57 ---- fd = socket(PF_ATMSVC, SOCK_DGRAM, 0); if (fd < 0) { ! diag(COMPONENT, DIAG_ERROR, "addr_getesi: socket: %s", strerror(errno)); return -1; *************** *** 61,65 **** req.length = ESI_LEN; retval = ioctl(fd, ATM_GETESI, &req); ! if (retval < 0) diag(COMPONENT, DIAG_ERROR, "ioctl ATM_GETESI: %s\n", strerror(errno)); close(fd); --- 61,65 ---- req.length = ESI_LEN; retval = ioctl(fd, ATM_GETESI, &req); ! if (retval < 0) diag(COMPONENT, DIAG_ERROR, "ioctl ATM_GETESI: %s", strerror(errno)); close(fd); *************** *** 80,84 **** fd = socket(PF_ATMSVC, SOCK_DGRAM, 0); if (fd < 0) { ! diag(COMPONENT, DIAG_ERROR, "get_listenaddr: socket: %s\n", strerror(errno)); return -1; --- 80,84 ---- fd = socket(PF_ATMSVC, SOCK_DGRAM, 0); if (fd < 0) { ! diag(COMPONENT, DIAG_ERROR, "get_listenaddr: socket: %s", strerror(errno)); return -1; *************** *** 88,92 **** req.length = sizeof(listen_addr); retval = ioctl(fd, ATM_GETADDR, &req); ! if (retval < 0) diag(COMPONENT, DIAG_ERROR, "ioctl ATM_GETADDR: %s\n", strerror(errno)); close(fd); --- 88,92 ---- req.length = sizeof(listen_addr); retval = ioctl(fd, ATM_GETADDR, &req); ! if (retval < 0) diag(COMPONENT, DIAG_ERROR, "ioctl ATM_GETADDR: %s", strerror(errno)); close(fd); Index: conn.c =================================================================== RCS file: /cvsroot/linux-atm/linux-atm/src/led/conn.c,v retrieving revision 1.2.2.2 retrieving revision 1.2.2.3 diff -C2 -d -r1.2.2.2 -r1.2.2.3 *** conn.c 16 Jul 2003 01:24:47 -0000 1.2.2.2 --- conn.c 19 Jul 2003 22:42:01 -0000 1.2.2.3 *************** *** 118,122 **** char qos_text[MAX_ATM_QOS_LEN + 1]; ! diag(COMPONENT, DIAG_DEBUG, "init_conn_params, conn_type %x\n", conn_type); memset(qos, 0, sizeof(struct atm_qos)); --- 118,122 ---- char qos_text[MAX_ATM_QOS_LEN + 1]; ! diag(COMPONENT, DIAG_DEBUG, "init_conn_params, conn_type %x", conn_type); memset(qos, 0, sizeof(struct atm_qos)); *************** *** 137,141 **** break; default: ! diag(COMPONENT, DIAG_ERROR, "unknown conn_type %x\n", conn_type); break; } --- 137,141 ---- break; default: ! diag(COMPONENT, DIAG_ERROR, "unknown conn_type %x", conn_type); break; } *************** *** 148,152 **** if (qos2text(qos_text, sizeof(qos_text), qos, 0) < 0) sprintf(qos_text, "<bad qos>"); ! diag(COMPONENT, DIAG_DEBUG, "init_conn_params, QoS '%s'\n", qos_text); } --- 148,152 ---- if (qos2text(qos_text, sizeof(qos_text), qos, 0) < 0) sprintf(qos_text, "<bad qos>"); ! diag(COMPONENT, DIAG_DEBUG, "init_conn_params, QoS '%s'", qos_text); } *************** *** 194,210 **** s = socket(PF_ATMSVC, SOCK_DGRAM, 0); if (s < 0) { ! diag(COMPONENT, DIAG_ERROR, "socket creation failure: %s\n", strerror(errno)); return -1; } ! diag(COMPONENT, DIAG_DEBUG, "get_socket: got fd %d\n", s); if (setsockopt(s, SOL_ATM, SO_ATMQOS, qos, sizeof(struct atm_qos)) < 0) { ! diag(COMPONENT, DIAG_ERROR, "get_socket: setsockopt SO_ATMQOS: %s\n", strerror(errno)); close(s); return -1; } if (setsockopt(s, SOL_ATM, SO_ATMSAP, sap, sizeof(struct atm_sap)) < 0) { ! diag(COMPONENT, DIAG_ERROR, "setup_svc setsockop(SO_ATMSAP)\n"); close(s); return -1; --- 194,210 ---- s = socket(PF_ATMSVC, SOCK_DGRAM, 0); if (s < 0) { ! diag(COMPONENT, DIAG_ERROR, "socket creation failure: %s", strerror(errno)); return -1; } ! diag(COMPONENT, DIAG_DEBUG, "get_socket: got fd %d", s); if (setsockopt(s, SOL_ATM, SO_ATMQOS, qos, sizeof(struct atm_qos)) < 0) { ! diag(COMPONENT, DIAG_ERROR, "get_socket: setsockopt SO_ATMQOS: %s", strerror(errno)); close(s); return -1; } if (setsockopt(s, SOL_ATM, SO_ATMSAP, sap, sizeof(struct atm_sap)) < 0) { ! diag(COMPONENT, DIAG_ERROR, "setup_svc setsockop(SO_ATMSAP)"); close(s); return -1; *************** *** 216,220 **** ret = bind(s, (struct sockaddr *)listen_addr, sizeof(struct sockaddr_atmsvc)); if (ret < 0) { ! diag(COMPONENT, DIAG_ERROR, "bind error: %s\n", strerror(errno)); close(s); return -1; --- 216,220 ---- ret = bind(s, (struct sockaddr *)listen_addr, sizeof(struct sockaddr_atmsvc)); if (ret < 0) { ! diag(COMPONENT, DIAG_ERROR, "bind error: %s", strerror(errno)); close(s); return -1; *************** *** 239,243 **** char buff[MAX_ATM_ADDR_LEN+1]; ! diag(COMPONENT, DIAG_DEBUG, "Outgoing call setup\n"); dst_addr->sas_family = AF_ATMSVC; --- 239,243 ---- char buff[MAX_ATM_ADDR_LEN+1]; ! diag(COMPONENT, DIAG_DEBUG, "Outgoing call setup"); dst_addr->sas_family = AF_ATMSVC; *************** *** 246,265 **** switch(sap->blli[0].l3.tr9577.snap[4]) { /* Kludge. Eh? */ case CONTROL_CONN: ! diag(COMPONENT, DIAG_DEBUG, "LE Control SVC setup\n"); break; case DATA_DIRECT_8023: ! diag(COMPONENT, DIAG_DEBUG, "Data direct 802.3\n"); break; case DATA_DIRECT_8025: ! diag(COMPONENT, DIAG_DEBUG, "Data direct 802.5\n"); break; case MCAST_CONN_8023: ! diag(COMPONENT, DIAG_DEBUG, "Multicast 802.3\n"); break; case MCAST_CONN_8025: ! diag(COMPONENT, DIAG_DEBUG, "Multicast 802.5\n"); break; default: ! diag(COMPONENT, DIAG_ERROR, "Unknown codepoint in svc setup\n"); } --- 246,265 ---- switch(sap->blli[0].l3.tr9577.snap[4]) { /* Kludge. Eh? */ case CONTROL_CONN: ! diag(COMPONENT, DIAG_DEBUG, "LE Control SVC setup"); break; case DATA_DIRECT_8023: ! diag(COMPONENT, DIAG_DEBUG, "Data direct 802.3"); break; case DATA_DIRECT_8025: ! diag(COMPONENT, DIAG_DEBUG, "Data direct 802.5"); break; case MCAST_CONN_8023: ! diag(COMPONENT, DIAG_DEBUG, "Multicast 802.3"); break; case MCAST_CONN_8025: ! diag(COMPONENT, DIAG_DEBUG, "Multicast 802.5"); break; default: ! diag(COMPONENT, DIAG_ERROR, "Unknown codepoint in svc setup"); } *************** *** 274,281 **** ret = fcntl(s, F_GETFL); if (ret < 0) { ! diag(COMPONENT, DIAG_ERROR, "fcntl(s, F_GETFL)\n"); close(s); } else if (fcntl(s, F_SETFL, ret|O_NONBLOCK) < 0) { ! diag(COMPONENT, DIAG_ERROR, "fcntl(s, F_SETFL, x|O_NONBLOCK)\n"); close(s); return NULL; --- 274,281 ---- ret = fcntl(s, F_GETFL); if (ret < 0) { ! diag(COMPONENT, DIAG_ERROR, "fcntl(s, F_GETFL)"); close(s); } else if (fcntl(s, F_SETFL, ret|O_NONBLOCK) < 0) { ! diag(COMPONENT, DIAG_ERROR, "fcntl(s, F_SETFL, x|O_NONBLOCK)"); close(s); return NULL; *************** *** 285,289 **** ret = connect(s, (struct sockaddr *)dst_addr, sizeof(struct sockaddr_atmsvc)); if (ret < 0 && errno != EINPROGRESS) { ! diag(COMPONENT, DIAG_ERROR, "connect error: %s\n", strerror(errno)); close(s); return NULL; --- 285,289 ---- ret = connect(s, (struct sockaddr *)dst_addr, sizeof(struct sockaddr_atmsvc)); if (ret < 0 && errno != EINPROGRESS) { ! diag(COMPONENT, DIAG_ERROR, "connect error: %s", strerror(errno)); close(s); return NULL; *************** *** 291,295 **** conn = list_add_conn(dst_addr->sas_addr.prv); ! diag(COMPONENT, DIAG_DEBUG, "Conn:%p\n", conn); if (conn == NULL) { close(s); --- 291,295 ---- conn = list_add_conn(dst_addr->sas_addr.prv); ! diag(COMPONENT, DIAG_DEBUG, "Conn:%p", conn); if (conn == NULL) { close(s); *************** *** 325,329 **** lec_params.data_listen = create_listensocket(&addr, &sap, &qos); if (lec_params.data_listen == NULL) { ! diag(COMPONENT, DIAG_FATAL, "Could not create listen socket for incoming Data Direct VCCs\n"); return -1; } --- 325,329 ---- lec_params.data_listen = create_listensocket(&addr, &sap, &qos); if (lec_params.data_listen == NULL) { ! diag(COMPONENT, DIAG_FATAL, "Could not create listen socket for incoming Data Direct VCCs"); return -1; } *************** *** 352,356 **** conn = setup_svc(&dst_addr, &my_addr, &sap, &qos); if (conn == NULL) { ! diag(COMPONENT, DIAG_ERROR, "Could not create Data Direct VCC\n"); delete_addr(dst_addr.sas_addr.prv); return -1; --- 352,356 ---- conn = setup_svc(&dst_addr, &my_addr, &sap, &qos); if (conn == NULL) { ! diag(COMPONENT, DIAG_ERROR, "Could not create Data Direct VCC"); delete_addr(dst_addr.sas_addr.prv); return -1; *************** *** 370,374 **** Conn_t *conn; ! diag(COMPONENT, DIAG_DEBUG, "conn_create_listensocket\n"); fd = get_socket(listen_addr, sap, qos); --- 370,374 ---- Conn_t *conn; ! diag(COMPONENT, DIAG_DEBUG, "conn_create_listensocket"); fd = get_socket(listen_addr, sap, qos); *************** *** 377,381 **** ret = listen(fd, 16); if (ret != 0) { ! diag(COMPONENT, DIAG_DEBUG, "Listen failed: %s\n", strerror(errno)); close(fd); return NULL; --- 377,381 ---- ret = listen(fd, 16); if (ret != 0) { ! diag(COMPONENT, DIAG_DEBUG, "Listen failed: %s", strerror(errno)); close(fd); return NULL; *************** *** 384,388 **** conn = list_add_conn(NULL); if (conn == NULL) { ! diag(COMPONENT, DIAG_ERROR, "List_add_conn failed\n"); close(fd); return NULL; --- 384,388 ---- conn = list_add_conn(NULL); if (conn == NULL) { ! diag(COMPONENT, DIAG_ERROR, "List_add_conn failed"); close(fd); return NULL; *************** *** 391,395 **** conn->type = LISTENING; conn->fd = fd; ! diag(COMPONENT, DIAG_DEBUG, "Listen socket created blli:%2.2x %2.2x fd: %d\n", sap->blli[0].l3.tr9577.snap[3], sap->blli[0].l3.tr9577.snap[4], --- 391,395 ---- conn->type = LISTENING; conn->fd = fd; ! diag(COMPONENT, DIAG_DEBUG, "Listen socket created blli:%2.2x %2.2x fd: %d", sap->blli[0].l3.tr9577.snap[3], sap->blli[0].l3.tr9577.snap[4], *************** *** 410,419 **** char buff[MAX_ATM_ADDR_LEN+1]; ! diag(COMPONENT, DIAG_DEBUG, "Accepting connection on fd %d\n", conn->fd); len = sizeof(addr); fd = accept(conn->fd, (struct sockaddr *)&addr, &len); ! diag(COMPONENT, DIAG_DEBUG, "accept returned %d\n", fd); if (fd < 0) { ! diag(COMPONENT, DIAG_ERROR, "accept: %s\n", strerror(errno)); return NULL; } --- 410,419 ---- char buff[MAX_ATM_ADDR_LEN+1]; ! diag(COMPONENT, DIAG_DEBUG, "Accepting connection on fd %d", conn->fd); len = sizeof(addr); fd = accept(conn->fd, (struct sockaddr *)&addr, &len); ! diag(COMPONENT, DIAG_DEBUG, "accept returned %d", fd); if (fd < 0) { ! diag(COMPONENT, DIAG_ERROR, "accept: %s", strerror(errno)); return NULL; } *************** *** 441,445 **** for(conn = connlist; conn; conn = next) { ! diag(COMPONENT, DIAG_DEBUG, "Destroying:%p fd:%d type:%d\n", conn, conn->fd, conn->type); next = conn->next; --- 441,445 ---- for(conn = connlist; conn; conn = next) { ! diag(COMPONENT, DIAG_DEBUG, "Destroying:%p fd:%d type:%d", conn, conn->fd, conn->type); next = conn->next; *************** *** 463,467 **** Conn_t *mcast; ! diag(COMPONENT, DIAG_DEBUG, "close_connection %p\n", conn); if (conn == lec_params.kernel || --- 463,467 ---- Conn_t *mcast; ! diag(COMPONENT, DIAG_DEBUG, "close_connection %p", conn); if (conn == lec_params.kernel || *************** *** 501,513 **** if (conn == lec_params.mcast_listen) { ! diag(COMPONENT, DIAG_DEBUG, "Multicast Forward VCC accepted\n"); ioc.receive = 2; } else { ! diag(COMPONENT, DIAG_DEBUG, "Data Direct VCC accepted\n"); ioc.receive = 0; if ((existing = conn_already_exists(new->atm_address, new)) && /* is calling address > called address */ (memcmp(new->atm_address, lec_params.c1n_my_atm_addr, ATM_ESA_LEN) > 0)) { ! diag(COMPONENT, DIAG_DEBUG, "Using it only to receive, spec 8.1.13\n"); ioc.receive = 1; existing = NULL; --- 501,513 ---- if (conn == lec_params.mcast_listen) { ! diag(COMPONENT, DIAG_DEBUG, "Multicast Forward VCC accepted"); ioc.receive = 2; } else { ! diag(COMPONENT, DIAG_DEBUG, "Data Direct VCC accepted"); ioc.receive = 0; if ((existing = conn_already_exists(new->atm_address, new)) && /* is calling address > called address */ (memcmp(new->atm_address, lec_params.c1n_my_atm_addr, ATM_ESA_LEN) > 0)) { ! diag(COMPONENT, DIAG_DEBUG, "Using it only to receive, spec 8.1.13"); ioc.receive = 1; existing = NULL; *************** *** 516,527 **** memcpy(ioc.atm_addr, new->atm_address, ATM_ESA_LEN); ioc.dev_num = lec_params.itf_num; ! diag(COMPONENT, DIAG_DEBUG, "Attaching a new VCC, fd %d\n", new->fd); if (ioctl(new->fd, ATMLEC_DATA, &ioc) < 0) { ! diag(COMPONENT, DIAG_ERROR, "VCC attach failed: ioctl: %s\n", strerror(errno)); return -1; } if (existing && existing->status == CONNECTED) { ! diag(COMPONENT, DIAG_DEBUG, "Closing old data direct, fd %d\n", existing->fd); close_connection(existing); } --- 516,527 ---- memcpy(ioc.atm_addr, new->atm_address, ATM_ESA_LEN); ioc.dev_num = lec_params.itf_num; ! diag(COMPONENT, DIAG_DEBUG, "Attaching a new VCC, fd %d", new->fd); if (ioctl(new->fd, ATMLEC_DATA, &ioc) < 0) { ! diag(COMPONENT, DIAG_ERROR, "VCC attach failed: ioctl: %s", strerror(errno)); return -1; } if (existing && existing->status == CONNECTED) { ! diag(COMPONENT, DIAG_DEBUG, "Closing old data direct, fd %d", existing->fd); close_connection(existing); } *************** *** 542,550 **** retval = recv_frame(conn, buff, sizeof(buff)); if (retval < 0) { ! diag(COMPONENT, DIAG_ERROR, "handle_data: read: %s\n", strerror(errno)); return (close_connection(conn)); } if (retval == 0) { ! diag(COMPONENT, DIAG_DEBUG, "fd %d, Data or Multicast VCC closed\n", conn->fd); return (close_connection(conn)); } --- 542,550 ---- retval = recv_frame(conn, buff, sizeof(buff)); if (retval < 0) { ! diag(COMPONENT, DIAG_ERROR, "handle_data: read: %s", strerror(errno)); return (close_connection(conn)); } if (retval == 0) { ! diag(COMPONENT, DIAG_DEBUG, "fd %d, Data or Multicast VCC closed", conn->fd); return (close_connection(conn)); } *************** *** 581,585 **** break; default: ! diag(COMPONENT, DIAG_ERROR, "check_connections: bad_type '%s'\n", get_type_string(conn->type)); break; --- 581,585 ---- break; default: ! diag(COMPONENT, DIAG_ERROR, "check_connections: bad_type '%s'", get_type_string(conn->type)); break; *************** *** 602,606 **** struct atmlec_ioc ioc; ! diag(COMPONENT, DIAG_DEBUG, "handle_connect: completing fd %d\n", conn->fd); /* this seems to be common method in Linux-ATM * making sure that nonblocking connect was --- 602,606 ---- struct atmlec_ioc ioc; ! diag(COMPONENT, DIAG_DEBUG, "handle_connect: completing fd %d", conn->fd); /* this seems to be common method in Linux-ATM * making sure that nonblocking connect was *************** *** 610,614 **** retval = connect(conn->fd, (struct sockaddr *)&dummy, sizeof(struct sockaddr_atmsvc)); if (retval < 0) { ! diag(COMPONENT, DIAG_DEBUG, "handle_connect: connect: %s\n", strerror(errno)); delete_addr(conn->atm_address); close_connection(conn); --- 610,614 ---- retval = connect(conn->fd, (struct sockaddr *)&dummy, sizeof(struct sockaddr_atmsvc)); if (retval < 0) { ! diag(COMPONENT, DIAG_DEBUG, "handle_connect: connect: %s", strerror(errno)); delete_addr(conn->atm_address); close_connection(conn); *************** *** 619,623 **** ioc.dev_num = lec_params.itf_num; ioc.receive = 0; ! diag(COMPONENT, DIAG_DEBUG, "Attaching a new active VCC, fd %d\n", conn->fd); if (conn_already_exists(conn->atm_address, conn) && /* is calling address > called address */ --- 619,623 ---- ioc.dev_num = lec_params.itf_num; ioc.receive = 0; ! diag(COMPONENT, DIAG_DEBUG, "Attaching a new active VCC, fd %d", conn->fd); if (conn_already_exists(conn->atm_address, conn) && /* is calling address > called address */ *************** *** 628,632 **** } if (ioctl(conn->fd, ATMLEC_DATA, &ioc) < 0) { ! diag(COMPONENT, DIAG_ERROR, "VCC attach failed: ioctl: %s\n", strerror(errno)); return -1; } --- 628,632 ---- } if (ioctl(conn->fd, ATMLEC_DATA, &ioc) < 0) { ! diag(COMPONENT, DIAG_ERROR, "VCC attach failed: ioctl: %s", strerror(errno)); return -1; } *************** *** 674,682 **** int ret; ! diag(COMPONENT, DIAG_DEBUG, "send_frame: fd:%d len:%ld\n", conn->fd, length); hdr = (struct frame_hdr *)frame; if (hdr->opcode == htons(READY_QUERY) || hdr->opcode == htons(READY_IND)) ! diag(COMPONENT, DIAG_DEBUG, "%s\n", opcode2text(hdr->opcode)); else display_frame(frame); --- 674,682 ---- int ret; ! diag(COMPONENT, DIAG_DEBUG, "send_frame: fd:%d len:%ld", conn->fd, length); hdr = (struct frame_hdr *)frame; if (hdr->opcode == htons(READY_QUERY) || hdr->opcode == htons(READY_IND)) ! diag(COMPONENT, DIAG_DEBUG, "%s", opcode2text(hdr->opcode)); else display_frame(frame); *************** *** 684,688 **** ret = write(conn->fd, frame, length); if (ret < 0) { ! diag(COMPONENT, DIAG_ERROR, "send_frame: write: %s\n", strerror(errno)); return -1; } --- 684,688 ---- ret = write(conn->fd, frame, length); if (ret < 0) { ! diag(COMPONENT, DIAG_ERROR, "send_frame: write: %s", strerror(errno)); return -1; } *************** *** 698,710 **** int ret; ! diag(COMPONENT, DIAG_DEBUG, "recv_frame: fd:%d\n", conn->fd); ret = read(conn->fd, buff, length); if (ret < 0) { ! diag(COMPONENT, DIAG_ERROR, "Read failed: %s\n", strerror(errno)); return -1; } #if 0 ! diag(COMPONENT, DIAG_DEBUG, "recv_frame: read %d bytes\n", ret); if (get_verbosity(COMPONENT) >= DIAG_DEBUG) { int i; --- 698,710 ---- int ret; ! diag(COMPONENT, DIAG_DEBUG, "recv_frame: fd:%d", conn->fd); ret = read(conn->fd, buff, length); if (ret < 0) { ! diag(COMPONENT, DIAG_ERROR, "Read failed: %s", strerror(errno)); return -1; } #if 0 ! diag(COMPONENT, DIAG_DEBUG, "recv_frame: read %d bytes", ret); if (get_verbosity(COMPONENT) >= DIAG_DEBUG) { int i; *************** *** 732,736 **** tv.tv_usec = (millis % 1000) * 1000; ! diag(COMPONENT, DIAG_DEBUG, "random_delay: sleeping %d.%d seconds\n", tv.tv_sec, tv.tv_usec); (void)select(0, NULL, NULL, NULL, &tv); --- 732,736 ---- tv.tv_usec = (millis % 1000) * 1000; ! diag(COMPONENT, DIAG_DEBUG, "random_delay: sleeping %d.%d seconds", tv.tv_sec, tv.tv_usec); (void)select(0, NULL, NULL, NULL, &tv); *************** *** 784,788 **** conn = list_add_conn(NULL); if (conn == NULL) { ! diag(COMPONENT, DIAG_ERROR, "conn_set_kernel_socket: list_add_conn failed\n"); return -1; } --- 784,788 ---- conn = list_add_conn(NULL); if (conn == NULL) { ! diag(COMPONENT, DIAG_ERROR, "conn_set_kernel_socket: list_add_conn failed"); return -1; } *************** *** 816,820 **** connlist->previous = conn; connlist = conn; ! diag(COMPONENT, DIAG_DEBUG, "Added conn:%p\n", conn); return conn; --- 816,820 ---- connlist->previous = conn; connlist = conn; ! diag(COMPONENT, DIAG_DEBUG, "Added conn:%p", conn); return conn; *************** *** 845,849 **** if (conn->next) conn->next->previous = conn->previous; ! diag(COMPONENT, DIAG_DEBUG, "Connlist: %p\n", connlist); conn->next=conn->previous= NULL; --- 845,849 ---- if (conn->next) conn->next->previous = conn->previous; ! diag(COMPONENT, DIAG_DEBUG, "Connlist: %p", connlist); conn->next=conn->previous= NULL; Index: display.c =================================================================== RCS file: /cvsroot/linux-atm/linux-atm/src/led/display.c,v retrieving revision 1.2 retrieving revision 1.2.2.1 diff -C2 -d -r1.2 -r1.2.2.1 *** display.c 9 Oct 2001 22:33:07 -0000 1.2 --- display.c 19 Jul 2003 22:42:01 -0000 1.2.2.1 *************** *** 68,72 **** *p = '\0'; ! diag(COMPONENT, DIAG_DEBUG, "%s\n", text); return; --- 68,72 ---- *p = '\0'; ! diag(COMPONENT, DIAG_DEBUG, "%s", text); return; *************** *** 75,79 **** static void display_ready(void *ready_frame) { ! diag(COMPONENT, DIAG_DEBUG, "ready frame\n"); return; --- 75,79 ---- static void display_ready(void *ready_frame) { ! diag(COMPONENT, DIAG_DEBUG, "ready frame"); return; Index: frames.c =================================================================== RCS file: /cvsroot/linux-atm/linux-atm/src/led/frames.c,v retrieving revision 1.2.2.1 retrieving revision 1.2.2.2 diff -C2 -d -r1.2.2.1 -r1.2.2.2 *** frames.c 2 May 2003 16:39:36 -0000 1.2.2.1 --- frames.c 19 Jul 2003 22:42:01 -0000 1.2.2.2 *************** *** 63,67 **** if (size < sizeof(struct ready_frame)) { ! diag(COMPONENT, DIAG_DEBUG, "short frame, size %d\n", size); return -1; } --- 63,67 ---- if (size < sizeof(struct ready_frame)) { ! diag(COMPONENT, DIAG_DEBUG, "short frame, size %d", size); return -1; } *************** *** 76,85 **** if (hdr->opcode == htons(READY_QUERY) || hdr->opcode == htons(READY_IND)) { ! diag(COMPONENT, DIAG_DEBUG, "Received a %s\n", opcode2text(hdr->opcode)); return 0; } if (size < sizeof(struct ctrl_frame)) { ! diag(COMPONENT, DIAG_DEBUG, "short frame, size %d\n", size); return -1; } --- 76,85 ---- if (hdr->opcode == htons(READY_QUERY) || hdr->opcode == htons(READY_IND)) { ! diag(COMPONENT, DIAG_DEBUG, "Received a %s", opcode2text(hdr->opcode)); return 0; } if (size < sizeof(struct ctrl_frame)) { ! diag(COMPONENT, DIAG_DEBUG, "short frame, size %d", size); return -1; } *************** *** 98,102 **** f->header.opcode = htons(LE_FLUSH_RSP); if (send_frame(lec_params.ctrl_direct, f, sizeof(struct ctrl_frame)) < 0) ! diag(COMPONENT, DIAG_DEBUG, "could not send LE_FLUSH_RESPONSE\n"); return; --- 98,102 ---- f->header.opcode = htons(LE_FLUSH_RSP); if (send_frame(lec_params.ctrl_direct, f, sizeof(struct ctrl_frame)) < 0) ! diag(COMPONENT, DIAG_DEBUG, "could not send LE_FLUSH_RESPONSE"); return; *************** *** 110,114 **** if (f->header.lec_id != htons(lec_params.c14_lec_id)) { ! diag(COMPONENT, DIAG_DEBUG, "Wrong lec_id, ignoring\n"); return; } --- 110,114 ---- if (f->header.lec_id != htons(lec_params.c14_lec_id)) { ! diag(COMPONENT, DIAG_DEBUG, "Wrong lec_id, ignoring"); return; } *************** *** 165,169 **** if (frame->header.lec_id == htons(lec_params.c14_lec_id)) { ! diag(COMPONENT, DIAG_DEBUG, "Ignoring own LE_ARP_REQUEST\n"); return 0; } --- 165,169 ---- if (frame->header.lec_id == htons(lec_params.c14_lec_id)) { ! diag(COMPONENT, DIAG_DEBUG, "Ignoring own LE_ARP_REQUEST"); return 0; } *************** *** 222,226 **** if (frame->header.lec_id == htons(lec_params.c14_lec_id) || lec_params.c29_v2_capable == 0) { ! diag(COMPONENT, DIAG_DEBUG, "Ignoring LE_NARP_REQUEST\n"); return 0; } --- 222,226 ---- if (frame->header.lec_id == htons(lec_params.c14_lec_id) || lec_params.c29_v2_capable == 0) { ! diag(COMPONENT, DIAG_DEBUG, "Ignoring LE_NARP_REQUEST"); return 0; } *************** *** 258,262 **** if (frame->header.lec_id != htons(lec_params.c14_lec_id)) { ! diag(COMPONENT, DIAG_DEBUG, "Wrong lec_id, ignoring\n"); return 0; } --- 258,262 ---- if (frame->header.lec_id != htons(lec_params.c14_lec_id)) { ! diag(COMPONENT, DIAG_DEBUG, "Wrong lec_id, ignoring"); return 0; } *************** *** 300,304 **** /* FIXME -- if its a receive only vcc we should not do this */ ! diag(COMPONENT, DIAG_DEBUG, "READY_IND, on fd %d; sending LE_FLUSH_REQ\n", conn->fd); memset(&msg, 0, sizeof(struct atmlec_msg)); msg.type = l_flush_tran_id; --- 300,304 ---- /* FIXME -- if its a receive only vcc we should not do this */ ! diag(COMPONENT, DIAG_DEBUG, "READY_IND, on fd %d; sending LE_FLUSH_REQ", conn->fd); memset(&msg, 0, sizeof(struct atmlec_msg)); msg.type = l_flush_tran_id; *************** *** 357,361 **** default: diag(COMPONENT, DIAG_ERROR, ! "Unknown frame, opcode 0x%x %s\n", ntohs(frame->header.opcode), opcode2text(frame->header.opcode)); break; --- 357,361 ---- default: diag(COMPONENT, DIAG_ERROR, ! "Unknown frame, opcode 0x%x %s", ntohs(frame->header.opcode), opcode2text(frame->header.opcode)); break; *************** *** 379,383 **** retval = send_frame(conn, &frame, sizeof(struct ready_frame)); if (retval < 0) ! diag(COMPONENT, DIAG_DEBUG, "Could not send READY_IND, fd %d\n", conn->fd); return; --- 379,383 ---- retval = send_frame(conn, &frame, sizeof(struct ready_frame)); if (retval < 0) ! diag(COMPONENT, DIAG_DEBUG, "Could not send READY_IND, fd %d", conn->fd); return; *************** *** 437,441 **** len = tlvp[4]; tlvp += 5; ! diag(COMPONENT, DIAG_DEBUG, "parse_tlvs: type %s len %d\n", tlv2text(type), len); if (tlvp + len > end_of_tlvs) --- 437,441 ---- len = tlvp[4]; tlvp += 5; ! diag(COMPONENT, DIAG_DEBUG, "parse_tlvs: type %s len %d", tlv2text(type), len); if (tlvp + len > end_of_tlvs) *************** *** 476,480 **** value16 = *(uint16_t *)tlvp; value16 = ntohs(value16); ! diag(COMPONENT, DIAG_DEBUG, "value of TLV %d\n", value16); switch (type) { case MAX_CUM_CTRL_TIMEOUT: --- 476,480 ---- value16 = *(uint16_t *)tlvp; value16 = ntohs(value16); ! diag(COMPONENT, DIAG_DEBUG, "value of TLV %d", value16); switch (type) { case MAX_CUM_CTRL_TIMEOUT: *************** *** 516,520 **** value32 = *(uint32_t *)tlvp; value32 = ntohl(value32); ! diag(COMPONENT, DIAG_DEBUG, "value of TLV %d\n", value32); switch (type) { case VCC_TIMEOUT_PERIOD: --- 516,520 ---- value32 = *(uint32_t *)tlvp; value32 = ntohl(value32); ! diag(COMPONENT, DIAG_DEBUG, "value of TLV %d", value32); switch (type) { case VCC_TIMEOUT_PERIOD: *************** *** 554,558 **** switch(type) { case CONFIG_FRAG_INFO: ! diag(COMPONENT, DIAG_INFO, "Got Config-Frag-Info TLV\n"); break; case LAYER3_ADDRESS: --- 554,558 ---- switch(type) { case CONFIG_FRAG_INFO: ! diag(COMPONENT, DIAG_INFO, "Got Config-Frag-Info TLV"); break; case LAYER3_ADDRESS: *************** *** 569,573 **** whine: ! diag(COMPONENT, DIAG_DEBUG, "Unknown TLV, type 0x%x, len %d\n", type, len); return; --- 569,573 ---- whine: ! diag(COMPONENT, DIAG_DEBUG, "Unknown TLV, type 0x%x, len %d", type, len); return; *************** *** 581,585 **** return; if (opcode != ntohs(LE_CONFIG_RSP)) { ! diag(COMPONENT, DIAG_WARN, "X5-Adjustment TLV received but not with LE_CONFIG_RSP\n"); return; } --- 581,585 ---- return; if (opcode != ntohs(LE_CONFIG_RSP)) { ! diag(COMPONENT, DIAG_WARN, "X5-Adjustment TLV received but not with LE_CONFIG_RSP"); return; } Index: join.c =================================================================== RCS file: /cvsroot/linux-atm/linux-atm/src/led/join.c,v retrieving revision 1.2 retrieving revision 1.2.2.1 diff -C2 -d -r1.2 -r1.2.2.1 *** join.c 9 Oct 2001 22:33:07 -0000 1.2 --- join.c 19 Jul 2003 22:42:01 -0000 1.2.2.1 *************** *** 116,120 **** Conn_t *conn; ! diag(COMPONENT, DIAG_DEBUG, "entering lec_configure\n"); /* initialize well known LECS addresses */ --- 116,120 ---- Conn_t *conn; ! diag(COMPONENT, DIAG_DEBUG, "entering lec_configure"); /* initialize well known LECS addresses */ *************** *** 133,137 **** if (lecs_method == LECS_MANUAL) { ! diag(COMPONENT, DIAG_DEBUG, "trying manual LECS address\n"); conn = setup_svc(manual_atm_addr, listen_addr, &sap, &qos); if (conn) { --- 133,137 ---- if (lecs_method == LECS_MANUAL) { ! diag(COMPONENT, DIAG_DEBUG, "trying manual LECS address"); conn = setup_svc(manual_atm_addr, listen_addr, &sap, &qos); if (conn) { *************** *** 142,146 **** else random_delay(); } ! diag(COMPONENT, DIAG_DEBUG, "trying well-known anycast LECS address\n"); conn = setup_svc(&addr_c5, listen_addr, &sap, &qos); if (conn) { --- 142,146 ---- else random_delay(); } ! diag(COMPONENT, DIAG_DEBUG, "trying well-known anycast LECS address"); conn = setup_svc(&addr_c5, listen_addr, &sap, &qos); if (conn) { *************** *** 150,154 **** } else random_delay(); ! diag(COMPONENT, DIAG_DEBUG, "trying well-known LECS address\n"); conn = setup_svc(&addr_47, listen_addr, &sap, &qos); if (conn) { --- 150,154 ---- } else random_delay(); ! diag(COMPONENT, DIAG_DEBUG, "trying well-known LECS address"); conn = setup_svc(&addr_47, listen_addr, &sap, &qos); if (conn) { *************** *** 182,191 **** lec_params.c7c_current_timeout = lec_params.c7i_initial_ctrl_timeout; /* reset it */ if (frame_size == 0) { ! diag(COMPONENT, DIAG_INFO, "Timed out while waiting for LE_CONFIGURE_RESPONSE\n"); return -1; /* timeout */ } if (parse_config_rsp(buff, frame_size) < 0) { ! diag(COMPONENT, DIAG_ERROR, "Parsing LE_CONFIG_RESPONSE indicates failure\n"); return -1; } --- 182,191 ---- lec_params.c7c_current_timeout = lec_params.c7i_initial_ctrl_timeout; /* reset it */ if (frame_size == 0) { ! diag(COMPONENT, DIAG_INFO, "Timed out while waiting for LE_CONFIGURE_RESPONSE"); return -1; /* timeout */ } if (parse_config_rsp(buff, frame_size) < 0) { ! diag(COMPONENT, DIAG_ERROR, "Parsing LE_CONFIG_RESPONSE indicates failure"); return -1; } *************** *** 204,208 **** char buff[MAX_CTRL_FRAME]; ! diag(COMPONENT, DIAG_DEBUG, "Sending LE_CONFIGURE_REQUEST\n"); /* TLVs make config frame variable length */ --- 204,208 ---- char buff[MAX_CTRL_FRAME]; ! diag(COMPONENT, DIAG_DEBUG, "Sending LE_CONFIGURE_REQUEST"); /* TLVs make config frame variable length */ *************** *** 252,256 **** retval = select(conn->fd + 1, &rfds, NULL, NULL, &tv); if (retval < 0) { ! diag(COMPONENT, DIAG_ERROR, "read_ctrl_rsp: select: %s\n", strerror(errno)); return retval; --- 252,256 ---- retval = select(conn->fd + 1, &rfds, NULL, NULL, &tv); if (retval < 0) { ! diag(COMPONENT, DIAG_ERROR, "read_ctrl_rsp: select: %s", strerror(errno)); return retval; *************** *** 260,269 **** frame_size = recv_frame(conn, buff, buffsize); if (frame_size < 0) { ! diag(COMPONENT, DIAG_ERROR, "read_ctrl_rsp: recv_frame: %s\n", strerror(errno)); return frame_size; } if (frame_size == 0) { ! diag(COMPONENT, DIAG_ERROR, "read_ctrl_rsp: conn closed: %s\n", strerror(errno)); return -1; --- 260,269 ---- frame_size = recv_frame(conn, buff, buffsize); if (frame_size < 0) { ! diag(COMPONENT, DIAG_ERROR, "read_ctrl_rsp: recv_frame: %s", strerror(errno)); return frame_size; } if (frame_size == 0) { ! diag(COMPONENT, DIAG_ERROR, "read_ctrl_rsp: conn closed: %s", strerror(errno)); return -1; *************** *** 281,287 **** struct ctrl_frame *frame; ! diag(COMPONENT, DIAG_DEBUG, "Parsing LE_CONFIG_RESPONSE\n"); if (validate_frame(buff, size) < 0) { ! diag(COMPONENT, DIAG_ERROR, "parse_config_rsp: bad frame\n"); return -1; } --- 281,287 ---- struct ctrl_frame *frame; ! diag(COMPONENT, DIAG_DEBUG, "Parsing LE_CONFIG_RESPONSE"); if (validate_frame(buff, size) < 0) { ! diag(COMPONENT, DIAG_ERROR, "parse_config_rsp: bad frame"); return -1; } *************** *** 289,298 **** frame = (struct ctrl_frame *)buff; if (frame->header.opcode != htons(LE_CONFIG_RSP)) { ! diag(COMPONENT, DIAG_ERROR, "parse_config_rsp: not a LE_CONFIG_RESPONSE\n"); return -1; } if (frame->header.status != 0) { ! diag(COMPONENT, DIAG_ERROR, "LECS said: %s\n", status2text(frame->header.status)); return -1; --- 289,298 ---- frame = (struct ctrl_frame *)buff; if (frame->header.opcode != htons(LE_CONFIG_RSP)) { ! diag(COMPONENT, DIAG_ERROR, "parse_config_rsp: not a LE_CONFIG_RESPONSE"); return -1; } if (frame->header.status != 0) { ! diag(COMPONENT, DIAG_ERROR, "LECS said: %s", status2text(frame->header.status)); return -1; *************** *** 333,340 **** int frame_size = 0; /* shut up, GCC */ ! diag(COMPONENT, DIAG_DEBUG, "Entering Join phase\n"); if (lecs_method == LECS_NONE) { ! diag(COMPONENT, DIAG_DEBUG, "Skipping LECS, connecting straight to LES\n"); memcpy(les_addr.sas_addr.prv, manual_atm_addr->sas_addr.prv, ATM_ESA_LEN); } else memcpy(les_addr.sas_addr.prv, lec_params.c9_les_atm_addr, ATM_ESA_LEN); --- 333,340 ---- int frame_size = 0; /* shut up, GCC */ ! diag(COMPONENT, DIAG_DEBUG, "Entering Join phase"); if (lecs_method == LECS_NONE) { ! diag(COMPONENT, DIAG_DEBUG, "Skipping LECS, connecting straight to LES"); memcpy(les_addr.sas_addr.prv, manual_atm_addr->sas_addr.prv, ATM_ESA_LEN); } else memcpy(les_addr.sas_addr.prv, lec_params.c9_les_atm_addr, ATM_ESA_LEN); *************** *** 344,348 **** lec_params.ctrl_direct = setup_svc(&les_addr, listen_addr, &sap, &qos); if (lec_params.ctrl_direct == NULL) { ! diag(COMPONENT, DIAG_ERROR, "Control direct SVC failed\n"); random_delay(); return -1; --- 344,348 ---- lec_params.ctrl_direct = setup_svc(&les_addr, listen_addr, &sap, &qos); if (lec_params.ctrl_direct == NULL) { ! diag(COMPONENT, DIAG_ERROR, "Control direct SVC failed"); random_delay(); return -1; *************** *** 350,354 **** lec_params.ctrl_listen = create_listensocket(listen_addr, &sap, &qos); if (lec_params.ctrl_listen == NULL) { ! diag(COMPONENT, DIAG_ERROR, "Control distribute listen socket failed\n"); random_delay(); return -1; --- 350,354 ---- lec_params.ctrl_listen = create_listensocket(listen_addr, &sap, &qos); if (lec_params.ctrl_listen == NULL) { ! diag(COMPONENT, DIAG_ERROR, "Control distribute listen socket failed"); random_delay(); return -1; *************** *** 358,362 **** while (lec_params.c7c_current_timeout <= lec_params.c7_ctrl_timeout) { if (send_join_req(lec_params.ctrl_direct) < 0) { ! diag(COMPONENT, DIAG_ERROR, "Sending LE_JOIN_REQUEST failed\n"); random_delay(); return -1; --- 358,362 ---- while (lec_params.c7c_current_timeout <= lec_params.c7_ctrl_timeout) { if (send_join_req(lec_params.ctrl_direct) < 0) { ! diag(COMPONENT, DIAG_ERROR, "Sending LE_JOIN_REQUEST failed"); random_delay(); return -1; *************** *** 364,368 **** frame_size = read_join_rsp(buff, sizeof(buff)); if (frame_size < 0) { ! diag(COMPONENT, DIAG_ERROR, "Receiving LE_JOIN_RESPONSE failed\n"); random_delay(); return -1; --- 364,368 ---- frame_size = read_join_rsp(buff, sizeof(buff)); if (frame_size < 0) { ! diag(COMPONENT, DIAG_ERROR, "Receiving LE_JOIN_RESPONSE failed"); random_delay(); return -1; *************** *** 374,383 **** lec_params.c7c_current_timeout = lec_params.c7i_initial_ctrl_timeout; /* reset it */ if (frame_size == 0) { ! diag(COMPONENT, DIAG_ERROR, "LE_JOIN_RESPONSE timed out\n"); return -1; } if (parse_join_rsp(buff, frame_size) < 0) { ! diag(COMPONENT, DIAG_ERROR, "Parsing LE_JOIN_RESPONSE failed\n"); return -1; } --- 374,383 ---- lec_params.c7c_current_timeout = lec_params.c7i_initial_ctrl_timeout; /* reset it */ if (frame_size == 0) { ! diag(COMPONENT, DIAG_ERROR, "LE_JOIN_RESPONSE timed out"); return -1; } if (parse_join_rsp(buff, frame_size) < 0) { ! diag(COMPONENT, DIAG_ERROR, "Parsing LE_JOIN_RESPONSE failed"); return -1; } *************** *** 473,477 **** retval = select(n, &rfds, NULL, NULL, &tv); if (retval < 0) { ! diag(COMPONENT, DIAG_ERROR, "get_join_rsp: select: %s\n", strerror(errno)); return -1; --- 473,477 ---- retval = select(n, &rfds, NULL, NULL, &tv); if (retval < 0) { ! diag(COMPONENT, DIAG_ERROR, "get_join_rsp: select: %s", strerror(errno)); return -1; *************** *** 486,498 **** frame_size = recv_frame(lec_params.ctrl_direct, buff, buffsize); if (frame_size < 0) { ! diag(COMPONENT, DIAG_ERROR, "get_join_rsp: recv_frame: %s\n", strerror(errno)); return -1; } if (frame_size == 0) { ! diag(COMPONENT, DIAG_ERROR, "get_join_rsp: Control direct VCC closed\n"); return -1; } ! diag(COMPONENT, DIAG_DEBUG, "LE_JOIN_RESPONSE over Control direct VCC\n"); } if (FD_ISSET(dist->fd, &rfds)) { --- 486,498 ---- frame_size = recv_frame(lec_params.ctrl_direct, buff, buffsize); if (frame_size < 0) { ! diag(COMPONENT, DIAG_ERROR, "get_join_rsp: recv_frame: %s", strerror(errno)); return -1; } if (frame_size == 0) { ! diag(COMPONENT, DIAG_ERROR, "get_join_rsp: Control direct VCC closed"); return -1; } ! diag(COMPONENT, DIAG_DEBUG, "LE_JOIN_RESPONSE over Control direct VCC"); } if (FD_ISSET(dist->fd, &rfds)) { *************** *** 502,509 **** lec_params.ctrl_dist = accept_conn(lec_params.ctrl_listen); if (lec_params.ctrl_dist == NULL) { ! diag(COMPONENT, DIAG_ERROR, "accept of Ctrl distribute failed\n"); return -1; } ! diag(COMPONENT, DIAG_DEBUG, "Closing listen socket for Ctrl distribute VCC\n"); close_connection(lec_params.ctrl_listen); lec_params.ctrl_listen = NULL; --- 502,509 ---- lec_params.ctrl_dist = accept_conn(lec_params.ctrl_listen); if (lec_params.ctrl_dist == NULL) { ! diag(COMPONENT, DIAG_ERROR, "accept of Ctrl distribute failed"); return -1; } ! diag(COMPONENT, DIAG_DEBUG, "Closing listen socket for Ctrl distribute VCC"); close_connection(lec_params.ctrl_listen); lec_params.ctrl_listen = NULL; *************** *** 515,527 **** frame_size = recv_frame(lec_params.ctrl_dist, buff, buffsize); if (frame_size < 0) { ! diag(COMPONENT, DIAG_ERROR, "get_join_rsp: recv_frame: %s\n", strerror(errno)); return -1; } if (frame_size == 0) { ! diag(COMPONENT, DIAG_ERROR, "Control distribute VCC closed\n"); return -1; } ! diag(COMPONENT, DIAG_DEBUG, "LE_JOIN_RESPONSE over Control distribute VCC\n"); } --- 515,527 ---- frame_size = recv_frame(lec_params.ctrl_dist, buff, buffsize); if (frame_size < 0) { ! diag(COMPONENT, DIAG_ERROR, "get_join_rsp: recv_frame: %s", strerror(errno)); return -1; } if (frame_size == 0) { ! diag(COMPONENT, DIAG_ERROR, "Control distribute VCC closed"); return -1; } ! diag(COMPONENT, DIAG_DEBUG, "LE_JOIN_RESPONSE over Control distribute VCC"); } *************** *** 537,541 **** struct ctrl_frame *frame; ! diag(COMPONENT, DIAG_DEBUG, "Parsing LE_JOIN_RESPONSE\n"); if (validate_frame(buff, size) < 0) return -1; --- 537,541 ---- struct ctrl_frame *frame; ! diag(COMPONENT, DIAG_DEBUG, "Parsing LE_JOIN_RESPONSE"); if (validate_frame(buff, size) < 0) return -1; *************** *** 546,550 **** if (frame->header.status != 0) { ! diag(COMPONENT, DIAG_ERROR, "LES said: %s\n", status2text(frame->header.status)); return -1; --- 546,550 ---- if (frame->header.status != 0) { ! diag(COMPONENT, DIAG_ERROR, "LES said: %s", status2text(frame->header.status)); return -1; *************** *** 561,565 **** if (!(frame->header.flags & htons(V2_REQUIRED)) && lec_params.c29_v2_capable) { ! diag(COMPONENT, DIAG_INFO, "LES did not return V2 Required Flag, acting as V1 client\n"); lec_params.c29_v2_capable = 0; } --- 561,565 ---- if (!(frame->header.flags & htons(V2_REQUIRED)) && lec_params.c29_v2_capable) { ! diag(COMPONENT, DIAG_INFO, "LES did not return V2 Required Flag, acting as V1 client"); lec_params.c29_v2_capable = 0; } *************** *** 567,571 **** (lec_params.c3_max_frame_size == MTU_1580)) { /* Against spec, but we'll accept the MTU and clear the flag */ ! diag(COMPONENT, DIAG_ERROR, "LES not LANEv2 but uses MTU of 1580 bytes\n"); lec_params.c29_v2_capable = 0; } --- 567,571 ---- (lec_params.c3_max_frame_size == MTU_1580)) { /* Against spec, but we'll accept the MTU and clear the flag */ ! diag(COMPONENT, DIAG_ERROR, "LES not LANEv2 but uses MTU of 1580 bytes"); lec_params.c29_v2_capable = 0; } *************** *** 610,619 **** retval = send_frame(lec_params.ctrl_direct, frame, sizeof(struct ctrl_frame)); if (retval < 0) { ! diag(COMPONENT, DIAG_ERROR, "LE_ARP_REQUEST for BUS failed\n"); return -1; } retval = get_bus_addr(&bus_addr); if (retval < 0) { ! diag(COMPONENT, DIAG_ERROR, "LE_ARP_RESPONSE for BUS failed\n"); return -1; } else if (retval > 0) --- 610,619 ---- retval = send_frame(lec_params.ctrl_direct, frame, sizeof(struct ctrl_frame)); if (retval < 0) { ! diag(COMPONENT, DIAG_ERROR, "LE_ARP_REQUEST for BUS failed"); return -1; } retval = get_bus_addr(&bus_addr); if (retval < 0) { ! diag(COMPONENT, DIAG_ERROR, "LE_ARP_RESPONSE for BUS failed"); return -1; } else if (retval > 0) *************** *** 622,626 **** } if (tries == 0) { ! diag(COMPONENT, DIAG_ERROR, "LE_ARP_RESPONSE for BUS timed out\n"); return -1; } --- 622,626 ---- } if (tries == 0) { ! diag(COMPONENT, DIAG_ERROR, "LE_ARP_RESPONSE for BUS timed out"); return -1; } *************** *** 634,638 **** lec_params.mcast_listen = create_listensocket(&listen_addr, &sap, &qos); if (lec_params.mcast_listen == NULL) { ! diag(COMPONENT, DIAG_ERROR, "Listen socket for BUS failed\n"); return -1; } --- 634,638 ---- lec_params.mcast_listen = create_listensocket(&listen_addr, &sap, &qos); if (lec_params.mcast_listen == NULL) { ! diag(COMPONENT, DIAG_ERROR, "Listen socket for BUS failed"); return -1; } *************** *** 640,653 **** lec_params.mcast_send = setup_svc(&bus_addr, &listen_addr, &sap, &qos); if (lec_params.mcast_send == NULL) { ! diag(COMPONENT, DIAG_ERROR, "Connect to BUS failed\n"); return -1; } /* Default Multicast send VCC to BUS ready, notify kernel */ if (ioctl(lec_params.mcast_send->fd, ATMLEC_MCAST, lec_params.itf_num) < 0) { ! diag(COMPONENT, DIAG_FATAL, "Can't change socket into LE mcast socket: %s\n", strerror(errno)); return -1; } ! diag(COMPONENT, DIAG_DEBUG, "About to wait for BUS to connect\n"); tv.tv_sec = lec_params.c7_ctrl_timeout; tv.tv_usec = 0; --- 640,653 ---- lec_params.mcast_send = setup_svc(&bus_addr, &listen_addr, &sap, &qos); if (lec_params.mcast_send == NULL) { ! diag(COMPONENT, DIAG_ERROR, "Connect to BUS failed"); return -1; } /* Default Multicast send VCC to BUS ready, notify kernel */ if (ioctl(lec_params.mcast_send->fd, ATMLEC_MCAST, lec_params.itf_num) < 0) { ! diag(COMPONENT, DIAG_FATAL, "Can't change socket into LE mcast socket: %s", strerror(errno)); return -1; } ! diag(COMPONENT, DIAG_DEBUG, "About to wait for BUS to connect"); tv.tv_sec = lec_params.c7_ctrl_timeout; tv.tv_usec = 0; *************** *** 657,665 **** retval = select(n, &rfds, NULL, NULL, &tv); if (retval == 0) { ! diag(COMPONENT, DIAG_ERROR, "BUS connect to Multicast Forward listen socket timed out\n"); return -1; } if (retval < 0) { ! diag(COMPONENT, DIAG_ERROR, "while waiting for Multicast Forward VCC: select: %s\n", strerror(errno)); return -1; --- 657,665 ---- retval = select(n, &rfds, NULL, NULL, &tv); if (retval == 0) { ! diag(COMPONENT, DIAG_ERROR, "BUS connect to Multicast Forward listen socket timed out"); return -1; } if (retval < 0) { ! diag(COMPONENT, DIAG_ERROR, "while waiting for Multicast Forward VCC: select: %s", strerror(errno)); return -1; *************** *** 667,671 **** mcast_fwd = accept_conn(lec_params.mcast_listen); if (mcast_fwd == NULL) { ! diag(COMPONENT, DIAG_ERROR, "BUS connect to Multicast Forward listen socket failed\n"); return -1; } --- 667,671 ---- mcast_fwd = accept_conn(lec_params.mcast_listen); if (mcast_fwd == NULL) { ! diag(COMPONENT, DIAG_ERROR, "BUS connect to Multicast Forward listen socket failed"); return -1; } *************** *** 674,680 **** ioc_data.dev_num = lec_params.itf_num; ioc_data.receive = 2; /* Multicast distribute */ ! diag(COMPONENT, DIAG_DEBUG, "About to notify kernel about Multicast Forward VCC\n"); if (ioctl(mcast_fwd->fd, ATMLEC_DATA, &ioc_data) < 0) { ! diag(COMPONENT, DIAG_DEBUG, "Could not notify kernel: %s\n", strerror(errno)); return -1; } --- 674,680 ---- ioc_data.dev_num = lec_params.itf_num; ioc_data.receive = 2; /* Multicast distribute */ ! diag(COMPONENT, DIAG_DEBUG, "About to notify kernel about Multicast Forward VCC"); if (ioctl(mcast_fwd->fd, ATMLEC_DATA, &ioc_data) < 0) { ! diag(COMPONENT, DIAG_DEBUG, "Could not notify kernel: %s", strerror(errno)); return -1; } *************** *** 716,724 **** } if (retval < 0) { ! diag(COMPONENT, DIAG_ERROR, "get_bus_addr: select: %s\n", strerror(errno)); return -1; } if (FD_ISSET(lec_params.ctrl_direct->fd, &rfds)) { ! diag(COMPONENT, DIAG_DEBUG, "get_bus_addr: ctrl.direct changed:\n"); retval = read_bus_arp(lec_params.ctrl_direct, addr, buff, sizeof(buff)); if (retval < 0) return -1; --- 716,724 ---- } if (retval < 0) { ! diag(COMPONENT, DIAG_ERROR, "get_bus_addr: select: %s", strerror(errno)); return -1; } if (FD_ISSET(lec_params.ctrl_direct->fd, &rfds)) { ! diag(COMPONENT, DIAG_DEBUG, "get_bus_addr: ctrl.direct changed:"); retval = read_bus_arp(lec_params.ctrl_direct, addr, buff, sizeof(buff)); if (retval < 0) return -1; *************** *** 726,738 **** } if (lec_params.ctrl_dist != NULL && FD_ISSET(lec_params.ctrl_dist->fd, &rfds)) { ! diag(COMPONENT, DIAG_DEBUG, "get_bus_addr: ctrl.dist changed:\n"); retval = read_bus_arp(lec_params.ctrl_dist, addr, buff, sizeof(buff)); if (retval < 0) return -1; if (retval > 0) return retval; } ! diag(COMPONENT, DIAG_DEBUG, "get_bus_addr: consumed a packet\n"); } ! diag(COMPONENT, DIAG_ERROR, "Timeout while waiting for BUS LE_ARP response\n"); return 0; } --- 726,738 ---- } if (lec_params.ctrl_dist != NULL && FD_ISSET(lec_params.ctrl_dist->fd, &rfds)) { ! diag(COMPONENT, DIAG_DEBUG, "get_bus_addr: ctrl.dist changed:"); retval = read_bus_arp(lec_params.ctrl_dist, addr, buff, sizeof(buff)); if (retval < 0) return -1; if (retval > 0) return retval; } ! diag(COMPONENT, DIAG_DEBUG, "get_bus_addr: consumed a packet"); } ! diag(COMPONENT, DIAG_ERROR, "Timeout while waiting for BUS LE_ARP response"); return 0; } *************** *** 748,756 **** frame_size = recv_frame(conn, buff, buffsize); if (frame_size == 0) { ! diag(COMPONENT, DIAG_ERROR, "LES Control connection closed\n"); return -1; } if (frame_size < 0) { ! diag(COMPONENT, DIAG_ERROR, "get_bus_arp: recv_frame: %s\n", strerror(errno)); return -1; } --- 748,756 ---- frame_size = recv_frame(conn, buff, buffsize); if (frame_size == 0) { ! diag(COMPONENT, DIAG_ERROR, "LES Control connection closed"); return -1; } if (frame_size < 0) { ! diag(COMPONENT, DIAG_ERR... [truncated message content] |