blob: fdd1732e1c9d15a10d440bcc556e651a6c272b5f [file] [log] [blame]
// Copyright 2019 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 SRC_BRINGUP_BIN_NETSVC_NETBOOT_H_
#define SRC_BRINGUP_BIN_NETSVC_NETBOOT_H_
#include "src/bringup/bin/netsvc/inet6.h"
struct nbfile_t {
uint8_t* data;
size_t size; // max size of buffer
size_t offset; // write pointer
};
void netboot_advertise(const char* nodename);
void netboot_recv(void* data, size_t len, bool is_mcast, const ip6_addr_t* daddr, uint16_t dport,
const ip6_addr_t* saddr, uint16_t sport);
extern "C" void netboot_run_cmd(const char* cmd);
// Ask for a buffer suitable to put the file `name` in
// Return NULL to indicate `name` is not wanted.
nbfile_t* netboot_get_buffer(const char* name, size_t size);
#endif // SRC_BRINGUP_BIN_NETSVC_NETBOOT_H_