aboutsummaryrefslogtreecommitdiffstats
path: root/net/tipc/port.c
diff options
context:
space:
mode:
Diffstat (limited to 'net/tipc/port.c')
-rw-r--r--net/tipc/port.c44
1 files changed, 0 insertions, 44 deletions
diff --git a/net/tipc/port.c b/net/tipc/port.c
index d760336f2ca8..5c4285b2d555 100644
--- a/net/tipc/port.c
+++ b/net/tipc/port.c
@@ -710,50 +710,6 @@ struct sk_buff *tipc_port_get_ports(void)
710 return buf; 710 return buf;
711} 711}
712 712
713#if 0
714
715#define MAX_PORT_STATS 2000
716
717struct sk_buff *port_show_stats(const void *req_tlv_area, int req_tlv_space)
718{
719 u32 ref;
720 struct port *p_ptr;
721 struct sk_buff *buf;
722 struct tlv_desc *rep_tlv;
723 struct print_buf pb;
724 int str_len;
725
726 if (!TLV_CHECK(req_tlv_area, req_tlv_space, TIPC_TLV_PORT_REF))
727 return cfg_reply_error_string(TIPC_CFG_TLV_ERROR);
728
729 ref = *(u32 *)TLV_DATA(req_tlv_area);
730 ref = ntohl(ref);
731
732 p_ptr = tipc_port_lock(ref);
733 if (!p_ptr)
734 return cfg_reply_error_string("port not found");
735
736 buf = tipc_cfg_reply_alloc(TLV_SPACE(MAX_PORT_STATS));
737 if (!buf) {
738 tipc_port_unlock(p_ptr);
739 return NULL;
740 }
741 rep_tlv = (struct tlv_desc *)buf->data;
742
743 tipc_printbuf_init(&pb, TLV_DATA(rep_tlv), MAX_PORT_STATS);
744 port_print(p_ptr, &pb, 1);
745 /* NEED TO FILL IN ADDITIONAL PORT STATISTICS HERE */
746 tipc_port_unlock(p_ptr);
747 str_len = tipc_printbuf_validate(&pb);
748
749 skb_put(buf, TLV_SPACE(str_len));
750 TLV_SET(rep_tlv, TIPC_TLV_ULTRA_STRING, NULL, str_len);
751
752 return buf;
753}
754
755#endif
756
757void tipc_port_reinit(void) 713void tipc_port_reinit(void)
758{ 714{
759 struct port *p_ptr; 715 struct port *p_ptr;