📄 ckf_ether.c
字号:
#ifndef lintstatic char sccsid[] = "@(#)ckf_ether.c 1.1 92/07/30";#endif/* * Name: ckf_ether.c * * Description: Determine if a field is an internet address. * If the field is an internet address, then one is returned. * Otherwise, zero is returned. * * Call syntax: ret_code = ckf_ether_aton(arg_p, field_p); * * Parameters: pointer arg_p; * char * field_p; * * Return value: int ret_code; */#include <sys/types.h>#include <sys/socket.h>#include <net/if.h>#include <netinet/in.h>#include <netinet/if_ether.h>#include "menu.h"/* * External functions: */extern struct ether_addr * ether_aton();intckf_ether_aton(arg_p, field_p) pointer arg_p; char * field_p;{#ifdef lint arg_p = arg_p;#endif if (strlen(field_p) == 0 || ether_aton(field_p) == NULL) { menu_mesg("Field is not a valid Ethernet address."); return(0); } return(1);} /* end ckf_ether_aton() */
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -