tftpnaive.h
来自「2410 boot loader,usb ftp」· C头文件 代码 · 共 90 行
H
90 行
/* Copyright 2001-2004 Georges Menie (www.menie.org) This file is part of Tftpnaive. Tftpnaive is free software; you can redistribute it and/or modify it under the terms of the GNU Lesser General Public License as published by the Free Software Foundation; either version 2 of the License, or (at your option) any later version. Tftpnaive is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public License for more details. You should have received a copy of the GNU Lesser General Public License along with Tftpnaive; if not, write to the Free Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA*/#ifndef _TFTPNAIVE_H_#define _TFTPNAIVE_H_#define TFTPNAIVE_TIMEREQUEST 0#define TFTPNAIVE_CRCCHECK 1typedef struct { int mode; // 1: bootp+tftp, 2: tftp unsigned int local_ip; unsigned int remote_ip; unsigned int downaddr; char mac[6]; char file[128+1];}TFTPDownload;typedef struct { unsigned int ip; int TotalIRQ; int TotalEvent; int UnknownEvent; int RxEvent; int TxEvent; int BufEvent; int RxMiss; int TxColl; int RxQFull; int RxPacket; int (*send) (void *, unsigned short); unsigned char IEEEIA[6];} NetInterface;typedef struct { unsigned int server; unsigned int port; unsigned short bloc; unsigned short strtf; unsigned int strt; unsigned int addr; unsigned int bcnt; unsigned int inited; unsigned int sts; unsigned short crc; char file[128];} BootData;extern NetInterface netif;extern BootData *tftp_req;extern int netUp (char *);extern int netRequestIP (void);extern int netCheckIP (void);extern int netBoot (unsigned int);extern int netTFTPGet (void);extern int netDown (void);#if TFTPNAIVE_TIMEREQUESTextern int netTimestampRequest (int);#endif/*-------------*//* Error codes *//*-------------*/#define ERR_LINK 1#define ERR_CHIPID 2#define ERR_TIMEOUT 3#endif
⌨️ 快捷键说明
复制代码Ctrl + C
搜索代码Ctrl + F
全屏模式F11
增大字号Ctrl + =
减小字号Ctrl + -
显示快捷键?