blob: db2febbac1c69bfd895bbf990b164c93aafd64b5 [file] [log] [blame]
// Copyright 2017 The Fuchsia Authors. All rights reserved.
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.
#ifndef TOOLS_BOOTSERVER_OLD_BOOTSERVER_H_
#define TOOLS_BOOTSERVER_OLD_BOOTSERVER_H_
#include <netinet/in.h>
#include <stdbool.h>
#include <stddef.h>
void initialize_status(const char* name, size_t size);
void update_status(size_t bytes_so_far);
int tftp_xfer(struct sockaddr_in6* addr, const char* fn, const char* name, bool push);
int netboot_xfer(struct sockaddr_in6* addr, const char* fn, const char* name);
#define DEFAULT_TFTP_BLOCK_SZ 1428
#define DEFAULT_TFTP_WIN_SZ 256
#define DEFAULT_US_BETWEEN_PACKETS 20
extern char* appname;
extern int64_t us_between_packets;
extern uint16_t* tftp_block_size;
extern uint16_t* tftp_window_size;
#endif // TOOLS_BOOTSERVER_OLD_BOOTSERVER_H_