|
Packit Service |
99d1c0 |
/* -*- mode: c; c-basic-offset: 4; indent-tabs-mode: nil -*- */
|
|
Packit Service |
99d1c0 |
/*
|
|
Packit Service |
99d1c0 |
* Copyright 2016 by the Massachusetts Institute of Technology.
|
|
Packit Service |
99d1c0 |
* All Rights Reserved.
|
|
Packit Service |
99d1c0 |
*
|
|
Packit Service |
99d1c0 |
* Export of this software from the United States of America may
|
|
Packit Service |
99d1c0 |
* require a specific license from the United States Government.
|
|
Packit Service |
99d1c0 |
* It is the responsibility of any person or organization contemplating
|
|
Packit Service |
99d1c0 |
* export to obtain such a license before exporting.
|
|
Packit Service |
99d1c0 |
*
|
|
Packit Service |
99d1c0 |
* WITHIN THAT CONSTRAINT, permission to use, copy, modify, and
|
|
Packit Service |
99d1c0 |
* distribute this software and its documentation for any purpose and
|
|
Packit Service |
99d1c0 |
* without fee is hereby granted, provided that the above copyright
|
|
Packit Service |
99d1c0 |
* notice appear in all copies and that both that copyright notice and
|
|
Packit Service |
99d1c0 |
* this permission notice appear in supporting documentation, and that
|
|
Packit Service |
99d1c0 |
* the name of M.I.T. not be used in advertising or publicity pertaining
|
|
Packit Service |
99d1c0 |
* to distribution of the software without specific, written prior
|
|
Packit Service |
99d1c0 |
* permission. Furthermore if you modify this software you must label
|
|
Packit Service |
99d1c0 |
* your software as modified software and not distribute it in such a
|
|
Packit Service |
99d1c0 |
* fashion that it might be confused with the original M.I.T. software.
|
|
Packit Service |
99d1c0 |
* M.I.T. makes no representations about the suitability of
|
|
Packit Service |
99d1c0 |
* this software for any purpose. It is provided "as is" without express
|
|
Packit Service |
99d1c0 |
* or implied warranty.
|
|
Packit Service |
99d1c0 |
*/
|
|
Packit Service |
99d1c0 |
|
|
Packit Service |
99d1c0 |
#ifndef UDPPKTINFO_H
|
|
Packit Service |
99d1c0 |
#define UDPPKTINFO_H
|
|
Packit Service |
99d1c0 |
|
|
Packit Service |
99d1c0 |
#include "k5-int.h"
|
|
Packit Service |
99d1c0 |
|
|
Packit Service |
99d1c0 |
/*
|
|
Packit Service |
99d1c0 |
* This holds whatever additional information might be needed to
|
|
Packit Service |
99d1c0 |
* properly send back to the client from the correct local address.
|
|
Packit Service |
99d1c0 |
*
|
|
Packit Service |
99d1c0 |
* In this case, we only need one datum so far: On macOS, the
|
|
Packit Service |
99d1c0 |
* kernel doesn't seem to like sending from link-local addresses
|
|
Packit Service |
99d1c0 |
* unless we specify the correct interface.
|
|
Packit Service |
99d1c0 |
*/
|
|
Packit Service |
99d1c0 |
typedef union aux_addressing_info
|
|
Packit Service |
99d1c0 |
{
|
|
Packit Service |
99d1c0 |
int ipv6_ifindex;
|
|
Packit Service |
99d1c0 |
} aux_addressing_info;
|
|
Packit Service |
99d1c0 |
|
|
Packit Service |
99d1c0 |
krb5_error_code
|
|
Packit Service |
99d1c0 |
set_pktinfo(int sock, int family);
|
|
Packit Service |
99d1c0 |
|
|
Packit Service |
99d1c0 |
krb5_error_code
|
|
Packit Service |
99d1c0 |
recv_from_to(int sock, void *buf, size_t len, int flags,
|
|
Packit Service |
99d1c0 |
struct sockaddr *from, socklen_t *fromlen,
|
|
Packit Service |
99d1c0 |
struct sockaddr *to, socklen_t *tolen,
|
|
Packit Service |
99d1c0 |
aux_addressing_info *auxaddr);
|
|
Packit Service |
99d1c0 |
|
|
Packit Service |
99d1c0 |
krb5_error_code
|
|
Packit Service |
99d1c0 |
send_to_from(int sock, void *buf, size_t len, int flags,
|
|
Packit Service |
99d1c0 |
const struct sockaddr *to, socklen_t tolen, struct sockaddr *from,
|
|
Packit Service |
99d1c0 |
socklen_t fromlen, aux_addressing_info *auxaddr);
|
|
Packit Service |
99d1c0 |
|
|
Packit Service |
99d1c0 |
#endif /* UDPPKTINFO_H */
|