Skip to content

Commit

Permalink
Browse files Browse the repository at this point in the history
[udp] Move high-frequency debug messages to DBGLVL_EXTRA
This makes it possible to leave UDP debugging enabled in order to see
interesting UDP events, without flooding the console with at least one
message per packet.

Signed-off-by: Michael Brown <mcb30@ipxe.org>
  • Loading branch information
mcb30 committed Aug 6, 2013
1 parent b768851 commit e972057
Showing 1 changed file with 5 additions and 5 deletions.
10 changes: 5 additions & 5 deletions src/net/udp.c
Expand Up @@ -220,9 +220,9 @@ static int udp_tx ( struct udp_connection *udp, struct io_buffer *iobuf,
udphdr->chksum = tcpip_chksum ( udphdr, len );

/* Dump debugging information */
DBGC ( udp, "UDP %p TX %d->%d len %d\n", udp,
ntohs ( udphdr->src ), ntohs ( udphdr->dest ),
ntohs ( udphdr->len ) );
DBGC2 ( udp, "UDP %p TX %d->%d len %d\n", udp,
ntohs ( udphdr->src ), ntohs ( udphdr->dest ),
ntohs ( udphdr->len ) );

/* Send it to the next layer for processing */
if ( ( rc = tcpip_tx ( iobuf, &udp_protocol, src, dest, netdev,
Expand Down Expand Up @@ -317,8 +317,8 @@ static int udp_rx ( struct io_buffer *iobuf, struct sockaddr_tcpip *st_src,
iob_pull ( iobuf, sizeof ( *udphdr ) );

/* Dump debugging information */
DBGC ( udp, "UDP %p RX %d<-%d len %zd\n", udp,
ntohs ( udphdr->dest ), ntohs ( udphdr->src ), ulen );
DBGC2 ( udp, "UDP %p RX %d<-%d len %zd\n", udp,
ntohs ( udphdr->dest ), ntohs ( udphdr->src ), ulen );

/* Ignore if no matching connection found */
if ( ! udp ) {
Expand Down

0 comments on commit e972057

Please sign in to comment.