00001 /* 00002 * iwconnect/iwconnect.h 00003 * $Rev: 1222 $ 00004 * 00005 * Copyright (C) 2008-2010 Reto Gantenbein 00006 * 00007 * This program is free software; you can redistribute it and/or modify 00008 * it under the terms of the GNU General Public License version 2 as 00009 * published by the Free Software Foundation. 00010 */ 00011 00017 #ifndef __IWCONNECT_H 00018 #define __IWCONNECT_H 00019 00020 /* INCLUDES *******************************************************************/ 00021 00022 #include <netinet/in.h> 00023 #include <linux/if.h> // IFNAMSIZ 00024 #include <linux/if_ether.h> // ETH_ALEN 00025 #include <limits.h> // HOST_NAME_MAX 00026 #include <netdb.h> // struct addrinfo, struct sockaddr 00027 #include <vif.h> // MAX_NUM_VIF 00028 00029 00030 /* PM TYPES *******************************************************************/ 00031 00033 typedef struct iwc_host_info { 00034 char hostname[HOST_NAME_MAX + 1]; 00035 struct addrinfo addr_info; 00036 struct sockaddr_storage addr; 00037 } 00038 iwc_host_info; 00039 00041 typedef struct iwc_client_info { 00042 char host_id[2 * ETH_ALEN + 1]; 00043 iwc_host_info host_info; 00044 char host_if[IFNAMSIZ + 1]; 00045 unsigned char host_mac[ETH_ALEN]; 00046 char host_port[5]; //TODO: remove -> DEPRICATED! 00047 } 00048 iwc_client_info; 00049 00051 typedef struct iwc_model_info { 00052 iwc_host_info host_info; 00053 } 00054 iwc_model_info; 00055 00056 00057 /* MISC FUNCTIONS *************************************************************/ 00058 00060 #define max(a, b) ((a) > (b) ? (a) : (b)) 00061 00062 #endif // __IWCONNECT_H