📄 unix.c
字号:
/* unix.c * linqianghe@163.com * 2006-10-20 */#include "util.h"#include "net-support.h"#include <linux/socket.h>#include <stdio.h>#include <string.h>static char *UNSPEC_print(unsigned char *ptr){ static char buff[64]; char *pos; unsigned int i; pos = buff; for (i = 0; i < sizeof(struct sockaddr); i++) { pos += sprintf(pos, "%02X-", (*ptr++ & 0377)); } buff[strlen(buff) - 1] = '\0'; return (buff);}static char *UNSPEC_sprint(struct sockaddr *sap, int numeric){ static char buf[64]; if (sap->sa_family == 0xFFFF || sap->sa_family == 0) return safe_strncpy( buf, "[NONE SET]", sizeof(buf) ); return ( UNSPEC_print((unsigned char *)sap->sa_data) );}struct aftype unspec_aftype ={ "unspec", NULL, AF_UNSPEC, 0, UNSPEC_print, UNSPEC_sprint, NULL, NULL, NULL,};
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -