⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 xsupconfcheck_common.c

📁 linux 下通过802.1认证的安装包
💻 C
字号:
/**
 * Routines for checking the "completeness" of a piece of the configuration.
 *
 * Licensed under the dual GPL/BSD license.  (See LICENSE file for more info.)
 *
 * \file xsupconfcheck_int.c
 *
 * \author chris@open1x.org
 *
 * $Id: xsupconfcheck_common.c,v 1.1.2.1 2007/06/02 01:38:59 chessing Exp $
 * $Date: 2007/06/02 01:38:59 $
 **/

#include <stdio.h>
#include <stdlib.h>
#include <string.h>

#include "../libxsupconfig/xsupconfig.h"
#include "../libxsupconfig/xsupconfig_structs.h"
#include "../../src/error_prequeue.h"
#include "../../src/interfaces.h"

/**
 * \brief Check to see if the interface listed is actually live on this system right now.
 *
 * @param[in] devdesc   The device description for the interface we want to look for.
 *
 * \retval NULL on error
 * \retval ptr to an interfaces struct on success
 **/
struct interfaces *xsupconfcheck_common_is_live_int(char *devdesc)
{
	struct interfaces *cur = NULL;

	cur = interfaces_get_cache_head();
	if (cur == NULL) return NULL;

	while ((cur != NULL) && (strcmp(cur->desc, devdesc) != 0))
		cur = cur->next;

	if (cur == NULL) return NULL;

	// Otherwise, it should be a live one.
	return cur;
}

⌨️ 快捷键说明

复制代码 Ctrl + C
搜索代码 Ctrl + F
全屏模式 F11
切换主题 Ctrl + Shift + D
显示快捷键 ?
增大字号 Ctrl + =
减小字号 Ctrl + -