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

📄 udpnxtp.c

📁 关于UDP方面的东西。。看不懂就算了。不适合基础者。
💻 C
字号:
/* udpnxtp.c - udpnxtp */#include <conf.h>#include <kernel.h>#include <network.h>/*------------------------------------------------------------------------ *  udpnxtp  -  return the next available UDP local "port" number *	N.B.: assumes udpmutex HELD *------------------------------------------------------------------------ */unsigned short udpnxtp(){	static	unsigned short	lastport = ULPORT;	Bool			inuse = TRUE;	struct	upq		*pup;	int			i;	while (inuse) {		lastport++;		if (lastport == 0)			lastport = ULPORT;		inuse = FALSE;		for (i=0; !inuse && i<UPPS ; i++) {			pup = &upqs[i];			inuse = pup->up_valid && pup->up_port == lastport;		}	}	return lastport;}

⌨️ 快捷键说明

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