1/*-
2 * Copyright (c) 2009-2010 The FreeBSD Foundation
3 * All rights reserved.
4 *
5 * This software was developed by Pawel Jakub Dawidek under sponsorship from
6 * the FreeBSD Foundation.
7 *
8 * Redistribution and use in source and binary forms, with or without
--- 14 unchanged lines hidden (view full) ---
23 * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
24 * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
25 * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
26 * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
27 * SUCH DAMAGE.
28 */
29
30#include <sys/cdefs.h>
31__FBSDID("$FreeBSD: head/sbin/hastd/proto.c 204076 2010-02-18 23:16:19Z pjd $");
32
33#include <sys/queue.h>
34
35#include <assert.h>
36#include <errno.h>
37#include <stdint.h>
38
39#include "proto.h"
40#include "proto_impl.h"
41
--- 200 unchanged lines hidden (view full) ---
242
243 assert(conn != NULL);
244 assert(conn->pc_magic == PROTO_CONN_MAGIC);
245 assert(conn->pc_proto != NULL);
246
247 conn->pc_proto->hp_remote_address(conn->pc_ctx, addr, size);
248}
249
250void
251proto_close(struct proto_conn *conn)
252{
253
254 assert(conn != NULL);
255 assert(conn->pc_magic == PROTO_CONN_MAGIC);
256 assert(conn->pc_proto != NULL);
257
258 conn->pc_proto->hp_close(conn->pc_ctx);
259 conn->pc_magic = 0;
260 free(conn);
261}
2 * Copyright (c) 2009-2010 The FreeBSD Foundation
3 * All rights reserved.
4 *
5 * This software was developed by Pawel Jakub Dawidek under sponsorship from
6 * the FreeBSD Foundation.
7 *
8 * Redistribution and use in source and binary forms, with or without
--- 14 unchanged lines hidden (view full) ---
23 * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
24 * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
25 * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
26 * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
27 * SUCH DAMAGE.
28 */
29
30#include <sys/cdefs.h>
31__FBSDID("$FreeBSD: head/sbin/hastd/proto.c 204076 2010-02-18 23:16:19Z pjd $");
32
33#include <sys/queue.h>
34
35#include <assert.h>
36#include <errno.h>
37#include <stdint.h>
38
39#include "proto.h"
40#include "proto_impl.h"
41
--- 200 unchanged lines hidden (view full) ---
242
243 assert(conn != NULL);
244 assert(conn->pc_magic == PROTO_CONN_MAGIC);
245 assert(conn->pc_proto != NULL);
246
247 conn->pc_proto->hp_remote_address(conn->pc_ctx, addr, size);
248}
249
250void
251proto_close(struct proto_conn *conn)
252{
253
254 assert(conn != NULL);
255 assert(conn->pc_magic == PROTO_CONN_MAGIC);
256 assert(conn->pc_proto != NULL);
257
258 conn->pc_proto->hp_close(conn->pc_ctx);
259 conn->pc_magic = 0;
260 free(conn);
261}