netkexec.h 830 B

1234567891011121314151617181920
  1. /* Kernel hot-reload over UDP (see netkexec.c). */
  2. #ifndef NETKEXEC_H
  3. #define NETKEXEC_H
  4. /* 1 if a kernel-reload header datagram is waiting (auto-detected from the WM
  5. * loop). Returns 0 while a kexec is already running or a net command owns
  6. * the receiver. While idle it also answers ARP/ICMP for our IP, so the board
  7. * stays reachable without running a command. */
  8. int netkexec_pending(void);
  9. /* Feed one frame received by another poller (the WebDAV server). Returns 1
  10. * when it was a KXNU/KXNP header; netkexec_pending() then reports it without
  11. * polling the NIC again. */
  12. int netkexec_capture_frame(const unsigned char *frame, unsigned int len);
  13. /* Process entry: receive the pending image into the kexec staging buffer,
  14. * verify it and jump. Never returns on success. */
  15. void program_netkexec_main(void);
  16. #endif