/* tipc_media_get_names - record names of registered media in buffer  */
struct sk_buff* tipc_media_get_names(void)
/* tipc_media_get_names - record names of registered media in buffer  */
struct sk_buff* tipc_media_get_names(void)
{
	struct sk_buff *buf;
	struct media *m_ptr;
	int i;
	buf = tipc_cfg_reply_alloc(MAX_MEDIA * TLV_SPACE(TIPC_MAX_MEDIA_NAME));
	if (!buf)
		return NULL;
	read_lock_bh(&tipc_net_lock);
	for (i = 0, m_ptr = media_list; i < media_count; i++, m_ptr++) {
		tipc_cfg_append_tlv(buf, TIPC_TLV_MEDIA_NAME, m_ptr->name,
				    strlen(m_ptr->name) + 1);
	}
	read_unlock_bh(&tipc_net_lock);
	return buf;
}