ubuntu 下 man if_indextoname 没有,怎么找?

系统安装、升级讨论
版面规则
我们都知道新人的确很菜,也喜欢抱怨,并且带有浓厚的Windows习惯,但既然在这里询问,我们就应该有责任帮助他们解决问题,而不是直接泼冷水、简单的否定或发表对解决问题没有任何帮助的帖子。乐于分享,以人为本,这正是Ubuntu的精神所在。
回复
honggaoyan
帖子: 7
注册时间: 2007-07-06 16:21

ubuntu 下 man if_indextoname 没有,怎么找?

#1

帖子 honggaoyan » 2007-08-17 9:42

ubuntu 下 man if_indextoname 没有,怎么找?

最近学c,,,,,查函数用法man的时候经常没有,,有没有通用的解决方法让我知道我缺少了哪个软件包,,,
让我好sudo apt-get install ****
头像
xhy
帖子: 3916
注册时间: 2005-12-28 1:16
系统: Ubuntu 12.10 X64
来自: 火星

#2

帖子 xhy » 2007-08-17 11:29

manpages-dev
目前负债150多万
头像
eexpress
帖子: 58428
注册时间: 2005-08-14 21:55
来自: 长沙

#3

帖子 eexpress » 2007-08-17 11:39

函数。到devhelp里面找。这样的不一定有的。
● 鸣学
头像
xhy
帖子: 3916
注册时间: 2005-12-28 1:16
系统: Ubuntu 12.10 X64
来自: 火星

#4

帖子 xhy » 2007-08-17 11:50

IF_INDEXTONAME(P) POSIX Programmer's Manual IF_INDEXTONAME(P)



NAME
if_indextoname - map a network interface index to its corresponding
name

SYNOPSIS
#include <net/if.h>

char *if_indextoname(unsigned ifindex, char *ifname);


DESCRIPTION
The if_indextoname() function shall map an interface index to its cor-
responding name.

When this function is called, ifname shall point to a buffer of at
least {IF_NAMESIZE} bytes. The function shall place in this buffer the
name of the interface with index ifindex.

RETURN VALUE
If ifindex is an interface index, then the function shall return the
value supplied in ifname, which points to a buffer now containing the
interface name. Otherwise, the function shall return a NULL pointer and
set errno to indicate the error.

ERRORS
The if_indextoname() function shall fail if:

ENXIO The interface does not exist.


The following sections are informative.
目前负债150多万
回复