Annotation of embedaddon/libpdel/net/route_msg.h, revision 1.1
1.1 ! misho 1:
! 2: /*
! 3: * Copyright (c) 2001-2002 Packet Design, LLC.
! 4: * All rights reserved.
! 5: *
! 6: * Subject to the following obligations and disclaimer of warranty,
! 7: * use and redistribution of this software, in source or object code
! 8: * forms, with or without modifications are expressly permitted by
! 9: * Packet Design; provided, however, that:
! 10: *
! 11: * (i) Any and all reproductions of the source or object code
! 12: * must include the copyright notice above and the following
! 13: * disclaimer of warranties; and
! 14: * (ii) No rights are granted, in any manner or form, to use
! 15: * Packet Design trademarks, including the mark "PACKET DESIGN"
! 16: * on advertising, endorsements, or otherwise except as such
! 17: * appears in the above copyright notice or in the software.
! 18: *
! 19: * THIS SOFTWARE IS BEING PROVIDED BY PACKET DESIGN "AS IS", AND
! 20: * TO THE MAXIMUM EXTENT PERMITTED BY LAW, PACKET DESIGN MAKES NO
! 21: * REPRESENTATIONS OR WARRANTIES, EXPRESS OR IMPLIED, REGARDING
! 22: * THIS SOFTWARE, INCLUDING WITHOUT LIMITATION, ANY AND ALL IMPLIED
! 23: * WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE,
! 24: * OR NON-INFRINGEMENT. PACKET DESIGN DOES NOT WARRANT, GUARANTEE,
! 25: * OR MAKE ANY REPRESENTATIONS REGARDING THE USE OF, OR THE RESULTS
! 26: * OF THE USE OF THIS SOFTWARE IN TERMS OF ITS CORRECTNESS, ACCURACY,
! 27: * RELIABILITY OR OTHERWISE. IN NO EVENT SHALL PACKET DESIGN BE
! 28: * LIABLE FOR ANY DAMAGES RESULTING FROM OR ARISING OUT OF ANY USE
! 29: * OF THIS SOFTWARE, INCLUDING WITHOUT LIMITATION, ANY DIRECT,
! 30: * INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, PUNITIVE, OR CONSEQUENTIAL
! 31: * DAMAGES, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES, LOSS OF
! 32: * USE, DATA OR PROFITS, HOWEVER CAUSED AND UNDER ANY THEORY OF
! 33: * LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
! 34: * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF
! 35: * THE USE OF THIS SOFTWARE, EVEN IF PACKET DESIGN IS ADVISED OF
! 36: * THE POSSIBILITY OF SUCH DAMAGE.
! 37: *
! 38: * Author: Archie Cobbs <archie@freebsd.org>
! 39: */
! 40:
! 41: #ifndef _PDEL_NET_ROUTE_MSG_H_
! 42: #define _PDEL_NET_ROUTE_MSG_H_
! 43:
! 44: struct route_msg;
! 45:
! 46: __BEGIN_DECLS
! 47:
! 48: extern struct route_msg *route_msg_create(void);
! 49: extern void route_msg_destroy(struct route_msg **msgp);
! 50: extern int route_msg_get_type(struct route_msg *msg);
! 51: extern void route_msg_set_type(struct route_msg *msg, int type);
! 52: extern int route_msg_get_index(struct route_msg *msg);
! 53: extern void route_msg_set_index(struct route_msg *msg, int index);
! 54: extern int route_msg_get_flags(struct route_msg *msg);
! 55: extern void route_msg_set_flags(struct route_msg *msg, int flags);
! 56: extern int route_msg_get_error(struct route_msg *msg);
! 57: extern pid_t route_msg_get_pid(struct route_msg *msg);
! 58: extern int route_msg_get_seq(struct route_msg *msg);
! 59: extern const struct sockaddr *route_msg_get_dest(struct route_msg *msg);
! 60: extern int route_msg_set_dest(struct route_msg *msg,
! 61: const struct sockaddr *dest);
! 62: extern const struct sockaddr *route_msg_get_gateway(struct route_msg *msg);
! 63: extern int route_msg_set_gateway(struct route_msg *msg,
! 64: const struct sockaddr *gateway);
! 65: extern const struct sockaddr *route_msg_get_netmask(struct route_msg *msg);
! 66: extern int route_msg_set_netmask(struct route_msg *msg,
! 67: const struct sockaddr *netmask);
! 68: extern const struct sockaddr *route_msg_get_genmask(struct route_msg *msg);
! 69: extern int route_msg_set_genmask(struct route_msg *msg,
! 70: const struct sockaddr *genmask);
! 71: extern const struct sockaddr *route_msg_get_ifp(struct route_msg *msg);
! 72: extern int route_msg_set_ifp(struct route_msg *msg,
! 73: const struct sockaddr *ifp);
! 74: extern const struct sockaddr *route_msg_get_ifa(struct route_msg *msg);
! 75: extern int route_msg_set_ifa(struct route_msg *msg,
! 76: const struct sockaddr *ifa);
! 77: extern const struct sockaddr *route_msg_get_author(struct route_msg *msg);
! 78: extern int route_msg_set_author(struct route_msg *msg,
! 79: const struct sockaddr *author);
! 80: extern const struct sockaddr *route_msg_get_brd(struct route_msg *msg);
! 81: extern int route_msg_set_brd(struct route_msg *msg,
! 82: const struct sockaddr *brd);
! 83: extern int route_msg_decode(const u_char *data, size_t dlen,
! 84: struct route_msg ***listp, const char *mtype);
! 85: extern int route_msg_encode(const struct route_msg *msg,
! 86: u_char *data, size_t dlen);
! 87: extern void route_msg_print(struct route_msg *msg, FILE *fp);
! 88: extern int route_msg_send(struct route_msg *msg, int sock);
! 89: extern int route_msg_recv(struct route_msg ***listp,
! 90: int sock, const char *mtype);
! 91:
! 92: __END_DECLS
! 93:
! 94: #endif /* _PDEL_NET_ROUTE_MSG_H_ */
! 95:
FreeBSD-CVSweb <freebsd-cvsweb@FreeBSD.org>