X-Git-Url: https://git.distorted.org.uk/~mdw/secnet/blobdiff_plain/c72d679d2344a22f55889da6932754986fc0a7b9..24982c27fdb324dacfffbe2e9a37388e4942a8ef:/comm-common.h diff --git a/comm-common.h b/comm-common.h index 6dad9ef..b517f95 100644 --- a/comm-common.h +++ b/comm-common.h @@ -1,3 +1,21 @@ +/* + * This file is part of secnet. + * See README for full list of copyright holders. + * + * secnet is free software; you can redistribute it and/or modify it + * under the terms of the GNU General Public License as published by + * the Free Software Foundation; either version d of the License, or + * (at your option) any later version. + * + * secnet is distributed in the hope that it will be useful, but + * WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * version 3 along with secnet; if not, see + * https://www.gnu.org/licenses/gpl.html. + */ #ifndef COMM_COMMON_H #define COMM_COMMON_H @@ -34,7 +52,7 @@ bool_t comm_notify(struct comm_notify_list *notify, struct buffer_if *buf, void comm_apply(struct commcommon *cc, void *st); #define COMM_APPLY(st,cc,prefix,desc,loc) \ - (st)=safe_malloc(sizeof(*(st)), desc "_apply"); \ + NEW(st); \ (cc)->loc=loc; \ (cc)->cl.description=desc; \ (cc)->ops.sendmsg=prefix##sendmsg; \ @@ -103,7 +121,7 @@ void udp_destroy_socket(struct udpcommon *uc, struct udpsock *us); const char *af_name(int af); void udp_sock_experienced(struct log_if *lg, struct udpcommon *uc, struct udpsocks *socks, struct udpsock *us, - bool_t recvsend, int af /* 0 means any */, + const union iaddr *dest, int af /* 0 means any */, int r, int errnoval); void udp_socks_register(struct udpcommon *uc, struct udpsocks *socks,