X-Git-Url: https://err.no/cgi-bin/gitweb.cgi?a=blobdiff_plain;f=net%2Ftipc%2Fdbg.h;h=5ef1bc8f64ef186b5db3dfedbe839fe25ef4c52e;hb=5307e46957e76d71f02d2d736030ad92cdb3dd8c;hp=227f050d2a52742552a8af61650f1b12bc135c6c;hpb=cf41f8ac386e8d62122e7e394b4c6b3e3ab30ede;p=linux-2.6 diff --git a/net/tipc/dbg.h b/net/tipc/dbg.h index 227f050d2a..5ef1bc8f64 100644 --- a/net/tipc/dbg.h +++ b/net/tipc/dbg.h @@ -1,8 +1,8 @@ /* * net/tipc/dbg.h: Include file for TIPC print buffer routines - * + * * Copyright (c) 1997-2006, Ericsson AB - * Copyright (c) 2005, Wind River Systems + * Copyright (c) 2005-2007, Wind River Systems * All rights reserved. * * Redistribution and use in source and binary forms, with or without @@ -37,23 +37,34 @@ #ifndef _TIPC_DBG_H #define _TIPC_DBG_H +/** + * struct print_buf - TIPC print buffer structure + * @buf: pointer to character array containing print buffer contents + * @size: size of character array + * @crs: pointer to first unused space in character array (i.e. final NUL) + * @echo: echo output to system console if non-zero + */ + struct print_buf { char *buf; u32 size; char *crs; - struct print_buf *next; + int echo; }; -void tipc_printbuf_init(struct print_buf *pb, char *buf, u32 sz); +#define TIPC_PB_MIN_SIZE 64 /* minimum size for a print buffer's array */ +#define TIPC_PB_MAX_STR 512 /* max printable string (with trailing NUL) */ + +void tipc_printbuf_init(struct print_buf *pb, char *buf, u32 size); void tipc_printbuf_reset(struct print_buf *pb); int tipc_printbuf_empty(struct print_buf *pb); int tipc_printbuf_validate(struct print_buf *pb); void tipc_printbuf_move(struct print_buf *pb_to, struct print_buf *pb_from); -void tipc_log_reinit(int log_size); -void tipc_log_stop(void); +int tipc_log_resize(int log_size); -struct sk_buff *tipc_log_resize(const void *req_tlv_area, int req_tlv_space); +struct sk_buff *tipc_log_resize_cmd(const void *req_tlv_area, + int req_tlv_space); struct sk_buff *tipc_log_dump(void); #endif