/* * connector.h * * 2004 Copyright (c) Evgeniy Polyakov * All rights reserved. * * This program 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 2 of the License, or * (at your option) any later version. * * This program 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 * along with this program; if not, write to the Free Software * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA */ #ifndef __CONNECTOR_H #define __CONNECTOR_H #include "../connector/cn_queue.h" #define CONNECTOR_MAX_MSG_SIZE 1024 struct cn_msg { struct cb_id id; __u32 seq; __u32 ack; __u32 len; /* Length of the following data */ __u8 data[0]; }; #ifdef __KERNEL__ #include struct cn_dev { u32 seq, groups; struct sock *nls; void (*input)(struct sock *sk, int len); struct cn_queue_dev *cbdev; }; int cn_add_callback(struct cb_id *, char *, void (* callback)(void *)); void cn_del_callback(struct cb_id *); void cn_netlink_send(struct cn_msg *); #endif /* __KERNEL__ */ #endif /* __CONNECTOR_H */