VirtualBox

source: vbox/trunk/src/VBox/Devices/Network/slirp/tftp.h@ 91627

Last change on this file since 91627 was 91627, checked in by vboxsync, 3 years ago

NAT/tftp: ​bugref:9350 - Define symbolic constants for TFTP error
codes. Use them. Same object code is generated.

  • Property svn:eol-style set to native
  • Property svn:keywords set to Author Date Id Revision
File size: 1.5 KB
Line 
1/* $Id: tftp.h 91627 2021-10-07 21:27:26Z vboxsync $ */
2/** @file
3 * NAT - TFTP server (declarations/defines).
4 */
5
6/*
7 * Copyright (C) 2006-2020 Oracle Corporation
8 *
9 * This file is part of VirtualBox Open Source Edition (OSE), as
10 * available from http://www.virtualbox.org. This file is free software;
11 * you can redistribute it and/or modify it under the terms of the GNU
12 * General Public License (GPL) as published by the Free Software
13 * Foundation, in version 2 as it comes in the "COPYING" file of the
14 * VirtualBox OSE distribution. VirtualBox OSE is distributed in the
15 * hope that it will be useful, but WITHOUT ANY WARRANTY of any kind.
16 */
17
18/* tftp defines */
19
20#ifndef _SLIRP_TFTP_H_
21#define _SLIRP_TFTP_H_
22
23#define TFTP_SESSIONS_MAX 3
24
25#define TFTP_SERVER 69
26
27#define TFTP_RRQ 1
28#define TFTP_WRQ 2
29#define TFTP_DATA 3
30#define TFTP_ACK 4
31#define TFTP_ERROR 5
32#define TFTP_OACK 6
33
34/* error codes */
35#define TFTP_EUNDEF 0 /* Not defined, see error message (if any). */
36#define TFTP_ENOENT 1 /* File not found. */
37#define TFTP_EACCESS 2 /* Access violation. */
38#define TFTP_EFBIG 3 /* Disk full or allocation exceeded. */
39#define TFTP_ENOSYS 4 /* Illegal TFTP operation. */
40#define TFTP_ESRCH 5 /* Unknown transfer ID. */
41#define TFTP_EEXIST 6 /* File already exists. */
42#define TFTP_EUSER 7 /* No such user. */
43/* RFC 2347 */
44#define TFTP_EONAK 8 /* Option refused. */
45
46
47#define TFTP_FILENAME_MAX 512
48
49
50int slirpTftpInput(PNATState pData, struct mbuf *m);
51int slirpTftpInit(PNATState pData);
52void slirpTftpTerm(PNATState pData);
53#endif
Note: See TracBrowser for help on using the repository browser.

© 2024 Oracle Support Privacy / Do Not Sell My Info Terms of Use Trademark Policy Automated Access Etiquette