forked from mirrors/tftp-hpa-google
Add code to always reply using the queried IP address, if the OS
makes it possible.
This commit is contained in:
parent
a24840a364
commit
ffa45eae76
8 changed files with 569 additions and 106 deletions
28
tftpd/recvfrom.h
Normal file
28
tftpd/recvfrom.h
Normal file
|
@ -0,0 +1,28 @@
|
|||
/* $Id$ */
|
||||
/* ----------------------------------------------------------------------- *
|
||||
*
|
||||
* Copyright 2001 H. Peter Anvin - All Rights Reserved
|
||||
*
|
||||
* This program is free software available under the same license
|
||||
* as the "OpenBSD" operating system, distributed at
|
||||
* http://www.openbsd.org/.
|
||||
*
|
||||
* ----------------------------------------------------------------------- */
|
||||
|
||||
/*
|
||||
* recvfrom.h
|
||||
*
|
||||
* Header for recvfrom substitute
|
||||
*
|
||||
*/
|
||||
|
||||
#include <sys/types.h>
|
||||
#include <sys/socket.h>
|
||||
#include <netinet/in.h>
|
||||
#include <arpa/inet.h>
|
||||
#include <stdlib.h>
|
||||
|
||||
int
|
||||
myrecvfrom(int s, void *buf, int len, unsigned int flags,
|
||||
struct sockaddr *from, int *fromlen,
|
||||
struct sockaddr_in *myaddr);
|
Loading…
Add table
Add a link
Reference in a new issue