📄 udpnxtp.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 + -