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

📄 ue_write.c,v

📁 用TCP/IP进行网际互连这本书得源代码,偶得,希望大家喜欢.推荐下载
💻 C,V
字号:
head	1.2;access;symbols;locks	dls:1.2; strict;comment	@ * @;1.2date	97.09.21.19.26.10;	author dls;	state Dist;branches;next	1.1;1.1date	94.08.04.20.19.17;	author dls;	state Orig;branches;next	;desc@@1.2log@pre-3e code@text@/* ue_write.c - ue_write */#include <conf.h>#include <kernel.h>#include <network.h>/*------------------------------------------------------------------------ * ue_write - write a single packet to an SMC Ultra Ethernet *------------------------------------------------------------------------ */intue_write(pdev, pep, len)struct devsw	*pdev;struct ep	*pep;int		len;{	struct utdev	*pud;	pud = (struct utdev *)pdev->dvioblk;	if (len > EP_MAXLEN) {		nif[pud->ud_ifnum].ni_odiscard++;		freebuf(pep);		return SYSERR;	}	/* subtract the local header */	len -= (int)&pep->ep_eh - (int)pep;	if (len < EP_MINLEN)		len = EP_MINLEN;	blkcopy(pep->ep_src, pud->ud_paddr, EP_ALEN);	pep->ep_len = len;	pep->ep_type = hs2net(pep->ep_type);	pep->ep_order &= ~EPO_NET;			if (enq(pud->ud_outq, pep, 0) < 0) {		nif[pud->ud_ifnum].ni_odiscard++;		freebuf(pep);		ue_wstrt(pud);		return SYSERR;	}	ue_wstrt(pud);	return OK;}@1.1log@Initial revision@text@a32 7if (pep->ep_type == hs2net(EPT_IP)) {	struct ip *pip = (struct ip *)pep->ep_data;	if (pip->ip_proto == hs2net(IPT_TCP)) {		kprintf("ue_write:\n");		pdump(pep);	}}@

⌨️ 快捷键说明

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