Fork us on GitHub Follow us on Facebook Follow us on Twitter

Changeset 23fe06c in mainline


Ignore:
Timestamp:
2011-11-30T20:34:41Z (10 years ago)
Author:
Jiri Svoboda <jiri@…>
Branches:
lfn, master
Children:
b0d82d1
Parents:
92e717c
Message:

Include connection name in more debug messages. Set conn name for socket-based connections.

Location:
uspace/srv/net/tl/tcp
Files:
4 edited

Legend:

Unmodified
Added
Removed
  • uspace/srv/net/tl/tcp/conn.c

    r92e717c r23fe06c  
    700700static cproc_t tcp_conn_seg_proc_ack(tcp_conn_t *conn, tcp_segment_t *seg)
    701701{
    702         log_msg(LVL_DEBUG, "tcp_conn_seg_proc_ack(%p, %p)", conn, seg);
     702        log_msg(LVL_DEBUG, "%s: tcp_conn_seg_proc_ack(%p, %p)",
     703            conn->name, conn, seg);
    703704
    704705        if ((seg->ctrl & CTL_ACK) == 0) {
     
    758759        size_t xfer_size;
    759760
    760         log_msg(LVL_DEBUG, "tcp_conn_seg_proc_text(%p, %p)", conn, seg);
     761        log_msg(LVL_DEBUG, "%s: tcp_conn_seg_proc_text(%p, %p)",
     762            conn->name, conn, seg);
    761763
    762764        switch (conn->cstate) {
     
    838840static cproc_t tcp_conn_seg_proc_fin(tcp_conn_t *conn, tcp_segment_t *seg)
    839841{
    840         log_msg(LVL_DEBUG, "tcp_conn_seg_proc_fin(%p, %p)", conn, seg);
     842        log_msg(LVL_DEBUG, "%s: tcp_conn_seg_proc_fin(%p, %p)",
     843            conn->name, conn, seg);
    841844        log_msg(LVL_DEBUG, " seg->len=%zu, seg->ctl=%u", (size_t) seg->len,
    842845            (unsigned) seg->ctrl);
     
    967970void tcp_conn_segment_arrived(tcp_conn_t *conn, tcp_segment_t *seg)
    968971{
    969         log_msg(LVL_DEBUG, "tcp_conn_segment_arrived(%p, %p)", conn, seg);
     972        log_msg(LVL_DEBUG, "%c: tcp_conn_segment_arrived(%p)",
     973            conn->name, seg);
    970974
    971975        switch (conn->cstate) {
  • uspace/srv/net/tl/tcp/sock.c

    r92e717c r23fe06c  
    248248
    249249        trc = tcp_uc_open(lport, &fsocket, ap_active, &socket->conn);
     250        socket->conn->name = (char *)"C";
    250251
    251252        switch (trc) {
     
    264265        /* Push one fragment notification to client's queue */
    265266        tcp_sock_notify_data(sock_core);
    266         log_msg(LVL_DEBUG, "tcp_sock_listen(): notify conn\n");
     267        log_msg(LVL_DEBUG, "tcp_sock_connect(): notify conn\n");
    267268}
    268269
     
    306307
    307308        trc = tcp_uc_open(sock_core->port, &fsocket, ap_passive, &conn);
     309        conn->name = (char *)"S";
    308310
    309311        log_msg(LVL_DEBUG, " - decode TCP return code");
     
    360362        /* Push one fragment notification to client's queue */
    361363        tcp_sock_notify_data(asock_core);
    362         log_msg(LVL_DEBUG, "tcp_sock_listen(): notify aconn\n");
     364        log_msg(LVL_DEBUG, "tcp_sock_accept(): notify aconn\n");
    363365}
    364366
     
    459461        int rc;
    460462
    461         log_msg(LVL_DEBUG, "tcp_sock_recv[from]()");
     463        log_msg(LVL_DEBUG, "%p: tcp_sock_recv[from]()", client);
    462464
    463465        socket_id = SOCKET_GET_SOCKET_ID(call);
  • uspace/srv/net/tl/tcp/tqueue.c

    r92e717c r23fe06c  
    9494        tcp_tqueue_entry_t *tqe;
    9595
    96         log_msg(LVL_DEBUG, "tcp_tqueue_seg(%p, %p)", conn, seg);
     96        log_msg(LVL_DEBUG, "%s: tcp_tqueue_seg(%p, %p)", conn->name, conn,
     97            seg);
    9798
    9899        /*
     
    211212        link_t *cur, *next;
    212213
    213         log_msg(LVL_DEBUG, "tcp_tqueue_ack_received(%p)", conn);
     214        log_msg(LVL_DEBUG, "%s: tcp_tqueue_ack_received(%p)", conn->name,
     215            conn);
    214216
    215217        cur = conn->retransmit.list.head.next;
     
    250252void tcp_conn_transmit_segment(tcp_conn_t *conn, tcp_segment_t *seg)
    251253{
    252         log_msg(LVL_DEBUG, "tcp_conn_transmit_segment(%p, %p)", conn, seg);
     254        log_msg(LVL_DEBUG, "%s: tcp_conn_transmit_segment(%p, %p)",
     255            conn->name, conn, seg);
    253256
    254257        seg->wnd = conn->rcv_wnd;
  • uspace/srv/net/tl/tcp/ucall.c

    r92e717c r23fe06c  
    111111        size_t xfer_size;
    112112
    113         log_msg(LVL_DEBUG, "tcp_uc_send()");
     113        log_msg(LVL_DEBUG, "%s: tcp_uc_send()", conn->name);
    114114
    115115        if (conn->cstate == st_closed)
     
    149149        size_t xfer_size;
    150150
    151         log_msg(LVL_DEBUG, "tcp_uc_receive()");
     151        log_msg(LVL_DEBUG, "%s: tcp_uc_receive()", conn->name);
    152152
    153153        if (conn->cstate == st_closed)
     
    189189        tcp_tqueue_ctrl_seg(conn, CTL_ACK);
    190190
    191         log_msg(LVL_DEBUG, "tcp_uc_receive() - returning %zu bytes",
    192             xfer_size);
     191        log_msg(LVL_DEBUG, "%s: tcp_uc_receive() - returning %zu bytes",
     192            conn->name, xfer_size);
    193193
    194194        return TCP_EOK;
     
    198198tcp_error_t tcp_uc_close(tcp_conn_t *conn)
    199199{
    200         log_msg(LVL_DEBUG, "tcp_uc_close()");
     200        log_msg(LVL_DEBUG, "%s: tcp_uc_close()", conn->name);
    201201
    202202        if (conn->cstate == st_closed)
Note: See TracChangeset for help on using the changeset viewer.