Main Page | Class List | Directories | File List | Class Members | File Members

ipmi_lanparm.h

Go to the documentation of this file.
00001 /*
00002  * ipmi_lanparm.h
00003  *
00004  * Routines for setting up a connection to an IPMI LAN interface.
00005  *
00006  * Author: MontaVista Software, Inc.
00007  *         Corey Minyard <minyard@mvista.com>
00008  *         source@mvista.com
00009  *
00010  * Copyright 2004 MontaVista Software Inc.
00011  *
00012  *  This program is free software; you can redistribute it and/or
00013  *  modify it under the terms of the GNU Lesser General Public License
00014  *  as published by the Free Software Foundation; either version 2 of
00015  *  the License, or (at your option) any later version.
00016  *
00017  *
00018  *  THIS SOFTWARE IS PROVIDED ``AS IS'' AND ANY EXPRESS OR IMPLIED
00019  *  WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF
00020  *  MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED.
00021  *  IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT,
00022  *  INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING,
00023  *  BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS
00024  *  OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
00025  *  ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR
00026  *  TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE
00027  *  USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
00028  *
00029  *  You should have received a copy of the GNU Lesser General Public
00030  *  License along with this program; if not, write to the Free
00031  *  Software Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
00032  */
00033 
00034 #ifndef _IPMI_LANPARM_H
00035 #define _IPMI_LANPARM_H
00036 
00037 #include <OpenIPMI/ipmi_types.h>
00038 
00039 #ifdef __cplusplus
00040 extern "C" {
00041 #endif
00042 
00043 /* The abstract type for lanparm. */
00044 typedef struct ipmi_lanparm_s ipmi_lanparm_t;
00045 
00046 
00047 /* Generic callback used to tell when a LANPARM operation is done. */
00048 typedef void (*ipmi_lanparm_done_cb)(ipmi_lanparm_t *lanparm,
00049                                      int            err,
00050                                      void           *cb_data);
00051 
00052 /* Generic callback for iterating. */
00053 typedef void (*ipmi_lanparm_ptr_cb)(ipmi_lanparm_t *lanparm,
00054                                     void           *cb_data);
00055 
00056 /* Allocate a LANPARM. */
00057 int ipmi_lanparm_alloc(ipmi_mc_t      *mc,
00058                        unsigned int   channel,
00059                        ipmi_lanparm_t **new_lanparm);
00060 
00061 /* Destroy a LANPARM. */
00062 int ipmi_lanparm_destroy(ipmi_lanparm_t       *lanparm,
00063                          ipmi_lanparm_done_cb handler,
00064                          void                 *cb_data);
00065 
00066 /* Used to track references to a lanparm.  You can use this instead of
00067    ipmi_lanparm_destroy, but use of the destroy function is
00068    recommended.  This is primarily here to help reference-tracking
00069    garbage collection systems like what is in Perl to be able to
00070    automatically destroy lanparms when they are done. */
00071 void ipmi_lanparm_ref(ipmi_lanparm_t *lanparm);
00072 void ipmi_lanparm_deref(ipmi_lanparm_t *lanparm);
00073 
00074 void ipmi_lanparm_iterate_lanparms(ipmi_domain_t       *domain,
00075                                    ipmi_lanparm_ptr_cb handler,
00076                                    void                *cb_data);
00077 
00078 ipmi_mcid_t ipmi_lanparm_get_mc_id(ipmi_lanparm_t *lanparm);
00079 unsigned int ipmi_lanparm_get_channel(ipmi_lanparm_t *lanparm);
00080 
00081 #define IPMI_LANPARM_NAME_LEN 64
00082 int ipmi_lanparm_get_name(ipmi_lanparm_t *lanparm, char *name, int length);
00083 
00084 
00085 
00086 /* Fetch a parameter value from the LANPARM.  The "set" and "block"
00087    parameters are the set selector and block selectors.  If those are
00088    not relevant for the given parm, then set them to zero.  Note that
00089    on the return data, the first byte (byte 0) is the revision number,
00090    the data starts in the second byte. */
00091 typedef void (*ipmi_lanparm_get_cb)(ipmi_lanparm_t    *lanparm,
00092                                     int               err,
00093                                     unsigned char     *data,
00094                                     unsigned int      data_len,
00095                                     void              *cb_data);
00096 int ipmi_lanparm_get_parm(ipmi_lanparm_t      *lanparm,
00097                           unsigned int        parm,
00098                           unsigned int        set,
00099                           unsigned int        block,
00100                           ipmi_lanparm_get_cb done,
00101                           void                *cb_data);
00102 
00103 /* Set the parameter value in the LANPARM to the given data. */
00104 int ipmi_lanparm_set_parm(ipmi_lanparm_t       *lanparm,
00105                           unsigned int         parm,
00106                           unsigned char        *data,
00107                           unsigned int         data_len,
00108                           ipmi_lanparm_done_cb done,
00109                           void                 *cb_data);
00110 
00111 /* The various LAN config parms. */
00112 #define IPMI_LANPARM_SET_IN_PROGRESS            0
00113 #define IPMI_LANPARM_AUTH_TYPE_SUPPORT          1
00114 #define IPMI_LANPARM_AUTH_TYPE_ENABLES          2
00115 #define IPMI_LANPARM_IP_ADDRESS                 3
00116 #define IPMI_LANPARM_IP_ADDRESS_SRC             4
00117 #define IPMI_LANPARM_MAX_ADDRESS                5
00118 #define IPMI_LANPARM_SUBNET_MASK                6
00119 #define IPMI_LANPARM_IPV4_HDR_PARMS             7
00120 #define IPMI_LANPARM_PRIMARY_RMCP_PORT          8
00121 #define IPMI_LANPARM_SECONDARY_RMCP_PORT        9
00122 #define IPMI_LANPARM_BMC_GENERATED_ARP_CNTL     10
00123 #define IPMI_LANPARM_GRATUIDOUS_ARP_INTERVAL    11
00124 #define IPMI_LANPARM_DEFAULT_GATEWAY_ADDR       12
00125 #define IPMI_LANPARM_DEFAULT_GATEWAY_MAC_ADDR   13
00126 #define IPMI_LANPARM_BACKUP_GATEWAY_ADDR        14
00127 #define IPMI_LANPARM_BACKUP_GATEWAY_MAC_ADDR    15
00128 #define IPMI_LANPARM_COMMUNITY_STRING           16
00129 #define IPMI_LANPARM_NUM_DESTINATIONS           17
00130 #define IPMI_LANPARM_DEST_TYPE                  18
00131 #define IPMI_LANPARM_DEST_ADDR                  19
00132 #define IPMI_LANPARM_VLAN_ID                    20
00133 #define IPMI_LANPARM_VLAN_PRIORITY              21
00134 #define IPMI_LANPARM_NUM_CIPHER_SUITE_ENTRIES   22
00135 #define IPMI_LANPARM_CIPHER_SUITE_ENTRY_SUPPORT 23
00136 #define IPMI_LANPARM_CIPHER_SUITE_ENTRY_PRIV    24
00137 #define IPMI_LANPARM_DEST_VLAN_TAG              25
00138 
00139 /* A full LAN configuration.  Note that you cannot allocate one of
00140    these, you can only fetch them, modify them, set them, and free
00141    them. */
00142 typedef struct ipmi_lan_config_s ipmi_lan_config_t;
00143 
00144 /* Get the full LAN configuration and lock the LAN.  Note that if the
00145    LAN is locked by another, you will get an EAGAIN error in the
00146    callback.  You can retry the operation, or if you are sure that it
00147    is free, you can call ipmi_lan_clear_lock() before retrying.  Note
00148    that the config in the callback *must* be freed by you. */
00149 typedef void (*ipmi_lan_get_config_cb)(ipmi_lanparm_t    *lanparm,
00150                                        int               err,
00151                                        ipmi_lan_config_t *config,
00152                                        void              *cb_data);
00153 int ipmi_lan_get_config(ipmi_lanparm_t         *lanparm,
00154                         ipmi_lan_get_config_cb done,
00155                         void                   *cb_data);
00156 
00157 /* Set the full LAN configuration.  The config *MUST* be locked and
00158    the lanparm must match the LAN that it was fetched with.  Note that
00159    a copy is made of the configuration, so you are free to do whatever
00160    you like with it after this.  Note that this unlocks the config, so
00161    it cannot be used for future set operations. */
00162 int ipmi_lan_set_config(ipmi_lanparm_t       *lanparm,
00163                         ipmi_lan_config_t    *config,
00164                         ipmi_lanparm_done_cb done,
00165                         void                 *cb_data);
00166 
00167 /* Clear the lock on a LAN.  If the LAN config is non-NULL, then it's
00168    lock is also cleared. */
00169 int ipmi_lan_clear_lock(ipmi_lanparm_t       *lanparm,
00170                         ipmi_lan_config_t    *lanc,
00171                         ipmi_lanparm_done_cb done,
00172                         void                 *cb_data);
00173 
00174 /* Free a LAN config. */
00175 void ipmi_lan_free_config(ipmi_lan_config_t *config);
00176 
00177 /*
00178  * Boatloads of data from the LAN config.  Note that all IP addresses,
00179  * ports, etc. are in network order.
00180  */
00181 
00182 /* This interface lets you fetch and set the data values by parm
00183    num. Note that the parm nums *DO NOT* correspond to the
00184    IPMI_LANPARM_xxx values above. */
00185 
00186 enum ipmi_lanconf_val_type_e { IPMI_LANCONFIG_INT, IPMI_LANCONFIG_BOOL,
00187                                IPMI_LANCONFIG_DATA,
00188                                IPMI_LANCONFIG_IP, IPMI_LANCONFIG_MAC };
00189 /* When getting the value, the valtype will be set to int or data.  If
00190    it is int or bool, the value is returned in ival and the dval is
00191    not used.  If it is data, ip, or mac, the data will be returned in
00192    an allocated array in dval and the length set in dval_len.  The
00193    data must be freed with ipmi_lanconfig_data_free().  The is used
00194    for some data items (the priv level for authentication type, the
00195    destination for alerts and destination addresses); for other items
00196    it is ignored.  The index should point to the value to fetch
00197    (starting at zero), it will be updated to the next value or -1 if
00198    no more are left.  The index will be unchanged if the parm does not
00199    support an index.
00200 
00201    The string name is returned in the name field, if it is not NULL.
00202 
00203    Note that when fetching a value, if the passed in pointer is NULL
00204    the data will not be filled in (except for index, which must always
00205    be present).  That lets you get the value type without getting the
00206    data, for instance. */
00207 int ipmi_lanconfig_get_val(ipmi_lan_config_t *lanc,
00208                            unsigned int      parm,
00209                            const char        **name,
00210                            int               *index,
00211                            enum ipmi_lanconf_val_type_e *valtype,
00212                            unsigned int      *ival,
00213                            unsigned char     **dval,
00214                            unsigned int      *dval_len);
00215   /* Set a value in the lan config.  You must know ahead of time the
00216      actual value type and set the proper one. */
00217 int ipmi_lanconfig_set_val(ipmi_lan_config_t *lanc,
00218                            unsigned int      parm,
00219                            int               index,
00220                            unsigned int      ival,
00221                            unsigned char     *dval,
00222                            unsigned int      dval_len);
00223 /* If the value is an integer, this can be used to determine if it is
00224    an enumeration and what the values are.  If the parm is not an
00225    enumeration, this will return ENOSYS for the parm.  Otherwise, if
00226    you pass in zero, you will get either the first enumeration value,
00227    or EINVAL if zero is not a valid enumeration, but there are others.
00228    If this returns EINVAL or 0, nval will be set to the next valid
00229    enumeration value, or -1 if val is the last or past the last
00230    enumeration value.  If this returns 0, val will be set to the
00231    string value for the enumeration. */
00232 int ipmi_lanconfig_enum_val(unsigned int parm, int val, int *nval,
00233                             const char **sval);
00234 /* Sometimes array indexes may be enumerations.  This allows the user
00235    to detect if a specific parm's array index is an enumeration, and
00236    to get the enumeration values.  */
00237 int ipmi_lanconfig_enum_idx(unsigned int parm, int idx, const char **sval);
00238 /* Free data from ipmi_lanconfig_get_val(). */
00239 void ipmi_lanconfig_data_free(void *data);
00240 /* Convert a string to a lanconfig parm number.  Returns -1 if the
00241    string is invalid. */
00242 unsigned int ipmi_lanconfig_str_to_parm(char *name);
00243 /* Convert the parm to a string name. */
00244 const char *ipmi_lanconfig_parm_to_str(unsigned int parm);
00245 /* Get the type of a specific parm. */
00246 int ipmi_lanconfig_parm_to_type(unsigned int                 parm,
00247                                 enum ipmi_lanconf_val_type_e *valtype);
00248 
00249 
00250 /* The first set of parameters here must be present, so they are
00251    returned directly, no errors for getting.  Setting returns an
00252    error. */
00253 
00254 /* Supported authentication types. This is read-only. */
00255 unsigned int ipmi_lanconfig_get_support_auth_oem(ipmi_lan_config_t *lanc);
00256 unsigned int ipmi_lanconfig_get_support_auth_straight(ipmi_lan_config_t *lanc);
00257 unsigned int ipmi_lanconfig_get_support_auth_md5(ipmi_lan_config_t *lanc);
00258 unsigned int ipmi_lanconfig_get_support_auth_md2(ipmi_lan_config_t *lanc);
00259 unsigned int ipmi_lanconfig_get_support_auth_none(ipmi_lan_config_t *lanc);
00260 
00261 /* Various IP-related information. */
00262 unsigned int ipmi_lanconfig_get_ip_addr_source(ipmi_lan_config_t *lanc);
00263 int ipmi_lanconfig_set_ip_addr_source(ipmi_lan_config_t *lanc,
00264                                       unsigned int      val);
00265 
00266 /* Number of allowed alert destinations.  This is read-only.  Note
00267    that this is *not* the value returned from the config, it is one
00268    more than the value, so it is the actual number of alert
00269    destinations (including the volatile destination 0). */
00270 unsigned int ipmi_lanconfig_get_num_alert_destinations(ipmi_lan_config_t *c);
00271 
00272 
00273 /* Everything else below returns an error. */
00274 int ipmi_lanconfig_get_ipv4_ttl(ipmi_lan_config_t *lanc,
00275                                 unsigned int      *val);
00276 int ipmi_lanconfig_set_ipv4_ttl(ipmi_lan_config_t *lanc,
00277                                 unsigned int      val);
00278 int ipmi_lanconfig_get_ipv4_flags(ipmi_lan_config_t *lanc,
00279                                   unsigned int      *val);
00280 int ipmi_lanconfig_set_ipv4_flags(ipmi_lan_config_t *lanc,
00281                                   unsigned int      val);
00282 int ipmi_lanconfig_get_ipv4_precedence(ipmi_lan_config_t *lanc,
00283                                        unsigned int      *val);
00284 int ipmi_lanconfig_set_ipv4_precedence(ipmi_lan_config_t *lanc,
00285                                        unsigned int      val);
00286 int ipmi_lanconfig_get_ipv4_tos(ipmi_lan_config_t *lanc,
00287                                 unsigned int      *val);
00288 int ipmi_lanconfig_set_ipv4_tos(ipmi_lan_config_t *lanc,
00289                                 unsigned int      val);
00290 
00291 /* Authorization enables for the various authentication levels. */
00292 int ipmi_lanconfig_get_enable_auth_oem(ipmi_lan_config_t *lanc,
00293                                        unsigned int      user,
00294                                        unsigned int      *val);
00295 int ipmi_lanconfig_get_enable_auth_straight(ipmi_lan_config_t *lanc,
00296                                             unsigned int      user,
00297                                             unsigned int      *val);
00298 int ipmi_lanconfig_get_enable_auth_md5(ipmi_lan_config_t *lanc,
00299                                        unsigned int      user,
00300                                        unsigned int      *val);
00301 int ipmi_lanconfig_get_enable_auth_md2(ipmi_lan_config_t *lanc,
00302                                        unsigned int      user,
00303                                        unsigned int      *val);
00304 int ipmi_lanconfig_get_enable_auth_none(ipmi_lan_config_t *lanc,
00305                                         unsigned int      user,
00306                                         unsigned int      *val);
00307 int ipmi_lanconfig_set_enable_auth_oem(ipmi_lan_config_t *lanc,
00308                                        unsigned int      user,
00309                                        unsigned int      val);
00310 int ipmi_lanconfig_set_enable_auth_straight(ipmi_lan_config_t *lanc,
00311                                             unsigned int      user,
00312                                             unsigned int      val);
00313 int ipmi_lanconfig_set_enable_auth_md5(ipmi_lan_config_t *lanc,
00314                                        unsigned int      user,
00315                                        unsigned int      val);
00316 int ipmi_lanconfig_set_enable_auth_md2(ipmi_lan_config_t *lanc,
00317                                        unsigned int      user,
00318                                        unsigned int      val);
00319 int ipmi_lanconfig_set_enable_auth_none(ipmi_lan_config_t *lanc,
00320                                         unsigned int      user,
00321                                         unsigned int      val);
00322 
00323 /* Addressing for the BMC. */
00324 int ipmi_lanconfig_get_ip_addr(ipmi_lan_config_t *lanc,
00325                                unsigned char     *data,
00326                                unsigned int      *data_len);
00327 int ipmi_lanconfig_set_ip_addr(ipmi_lan_config_t *lanc,
00328                                unsigned char     *data,
00329                                unsigned int      data_len);
00330 
00331 int ipmi_lanconfig_get_mac_addr(ipmi_lan_config_t *lanc,
00332                                 unsigned char     *data,
00333                                 unsigned int      *data_len);
00334 int ipmi_lanconfig_set_mac_addr(ipmi_lan_config_t *lanc,
00335                                 unsigned char     *data,
00336                                 unsigned int      data_len);
00337 
00338 int ipmi_lanconfig_get_subnet_mask(ipmi_lan_config_t *lanc,
00339                                    unsigned char     *data,
00340                                    unsigned int      *data_len);
00341 int ipmi_lanconfig_set_subnet_mask(ipmi_lan_config_t *lanc,
00342                                    unsigned char     *data,
00343                                    unsigned int      data_len);
00344 
00345 int ipmi_lanconfig_get_primary_rmcp_port(ipmi_lan_config_t *lanc,
00346                                          unsigned char     *data,
00347                                          unsigned int      *data_len);
00348 int ipmi_lanconfig_set_primary_rmcp_port(ipmi_lan_config_t *lanc,
00349                                          unsigned char     *data,
00350                                          unsigned int      data_len);
00351 int ipmi_lanconfig_get_port_rmcp_primary(ipmi_lan_config_t *lanc,
00352                                          unsigned int      *val);
00353 int ipmi_lanconfig_set_port_rmcp_primary(ipmi_lan_config_t *lanc,
00354                                          unsigned int      val);
00355 int ipmi_lanconfig_get_secondary_rmcp_port(ipmi_lan_config_t *lanc,
00356                                            unsigned char     *data,
00357                                            unsigned int      *data_len);
00358 int ipmi_lanconfig_set_secondary_rmcp_port(ipmi_lan_config_t *lanc,
00359                                            unsigned char     *data,
00360                                            unsigned int      data_len);
00361 int ipmi_lanconfig_get_port_rmcp_secondary(ipmi_lan_config_t *lanc,
00362                                            unsigned int      *val);
00363 int ipmi_lanconfig_set_port_rmcp_secondary(ipmi_lan_config_t *lanc,
00364                                            unsigned int      val);
00365 
00366 /* Control of ARP-ing.  These are optional and so may return errors. */
00367 int ipmi_lanconfig_get_bmc_generated_arps(ipmi_lan_config_t *lanc,
00368                                           unsigned int      *val);
00369 int ipmi_lanconfig_set_bmc_generated_arps(ipmi_lan_config_t *lanc,
00370                                           unsigned int      val);
00371 int ipmi_lanconfig_get_bmc_generated_garps(ipmi_lan_config_t *lanc,
00372                                            unsigned int      *val);
00373 int ipmi_lanconfig_set_bmc_generated_garps(ipmi_lan_config_t *lanc,
00374                                            unsigned int      val);
00375 int ipmi_lanconfig_get_garp_interval(ipmi_lan_config_t *lanc,
00376                                      unsigned int      *val);
00377 int ipmi_lanconfig_set_garp_interval(ipmi_lan_config_t *lanc,
00378                                      unsigned int      val);
00379 
00380 /* Gateway handling */
00381 int ipmi_lanconfig_get_default_gateway_ip_addr(ipmi_lan_config_t *lanc,
00382                                                unsigned char     *data,
00383                                                unsigned int      *data_len);
00384 int ipmi_lanconfig_set_default_gateway_ip_addr(ipmi_lan_config_t *lanc,
00385                                                unsigned char     *data,
00386                                                unsigned int      data_len);
00387 int ipmi_lanconfig_get_default_gateway_mac_addr(ipmi_lan_config_t *lanc,
00388                                                 unsigned char     *data,
00389                                                 unsigned int      *data_len);
00390 int ipmi_lanconfig_set_default_gateway_mac_addr(ipmi_lan_config_t *lanc,
00391                                                 unsigned char     *data,
00392                                                 unsigned int      data_len);
00393 int ipmi_lanconfig_get_backup_gateway_ip_addr(ipmi_lan_config_t *lanc,
00394                                               unsigned char     *data,
00395                                               unsigned int      *data_len);
00396 int ipmi_lanconfig_set_backup_gateway_ip_addr(ipmi_lan_config_t *lanc,
00397                                               unsigned char     *data,
00398                                               unsigned int      data_len);
00399 int ipmi_lanconfig_get_backup_gateway_mac_addr(ipmi_lan_config_t *lanc,
00400                                                unsigned char     *data,
00401                                                unsigned int      *data_len);
00402 int ipmi_lanconfig_set_backup_gateway_mac_addr(ipmi_lan_config_t *lanc,
00403                                                unsigned char     *data,
00404                                                unsigned int      data_len);
00405 
00406 /* The community string for SNMP traps sent. */
00407 int ipmi_lanconfig_get_community_string(ipmi_lan_config_t *lanc,
00408                                         unsigned char     *data,
00409                                         unsigned int      *data_len);
00410 int ipmi_lanconfig_set_community_string(ipmi_lan_config_t *lanc,
00411                                         unsigned char     *data,
00412                                         unsigned int      data_len);
00413 
00414 /* Everthing else is part of the LAN Alert destination table and is
00415    addressed on a per-destination basis. */
00416 int ipmi_lanconfig_get_alert_ack(ipmi_lan_config_t *lanc,
00417                                  unsigned int      dest,
00418                                  unsigned int      *val);
00419 int ipmi_lanconfig_set_alert_ack(ipmi_lan_config_t *lanc,
00420                                  unsigned int      dest,
00421                                  unsigned int      val);
00422 int ipmi_lanconfig_get_dest_type(ipmi_lan_config_t *lanc,
00423                                  unsigned int      dest,
00424                                  unsigned int      *val);
00425 int ipmi_lanconfig_set_dest_type(ipmi_lan_config_t *lanc,
00426                                  unsigned int      dest,
00427                                  unsigned int      val);
00428 int ipmi_lanconfig_get_alert_retry_interval(ipmi_lan_config_t *lanc,
00429                                             unsigned int      dest,
00430                                             unsigned int      *val);
00431 int ipmi_lanconfig_set_alert_retry_interval(ipmi_lan_config_t *lanc,
00432                                             unsigned int      dest,
00433                                             unsigned int      val);
00434 int ipmi_lanconfig_get_max_alert_retries(ipmi_lan_config_t *lanc,
00435                                          unsigned int      dest,
00436                                          unsigned int      *val);
00437 int ipmi_lanconfig_set_max_alert_retries(ipmi_lan_config_t *lanc,
00438                                          unsigned int      dest,
00439                                          unsigned int      val);
00440 int ipmi_lanconfig_get_dest_format(ipmi_lan_config_t *lanc,
00441                                    unsigned int      dest,
00442                                    unsigned int      *val);
00443 int ipmi_lanconfig_set_dest_format(ipmi_lan_config_t *lanc,
00444                                    unsigned int      dest,
00445                                    unsigned int      val);
00446 int ipmi_lanconfig_get_gw_to_use(ipmi_lan_config_t *lanc,
00447                                  unsigned int      dest,
00448                                  unsigned int      *val);
00449 int ipmi_lanconfig_set_gw_to_use(ipmi_lan_config_t *lanc,
00450                                  unsigned int      dest,
00451                                  unsigned int      val);
00452 int ipmi_lanconfig_get_dest_ip_addr(ipmi_lan_config_t *lanc,
00453                                     unsigned int      dest,
00454                                     unsigned char     *data,
00455                                     unsigned int      *data_len);
00456 int ipmi_lanconfig_set_dest_ip_addr(ipmi_lan_config_t *lanc,
00457                                     unsigned int      dest,
00458                                     unsigned char     *data,
00459                                     unsigned int      data_len);
00460 int ipmi_lanconfig_get_dest_mac_addr(ipmi_lan_config_t *lanc,
00461                                      unsigned int      dest,
00462                                      unsigned char     *data,
00463                                      unsigned int      *data_len);
00464 int ipmi_lanconfig_set_dest_mac_addr(ipmi_lan_config_t *lanc,
00465                                      unsigned int      dest,
00466                                      unsigned char     *data,
00467                                      unsigned int      data_len);
00468 int ipmi_lanconfig_get_dest_vlan_tag_type(ipmi_lan_config_t *lanc,
00469                                           unsigned int      dest,
00470                                           unsigned int      *val);
00471 int ipmi_lanconfig_set_dest_vlan_tag_type(ipmi_lan_config_t *lanc,
00472                                           unsigned int      dest,
00473                                           unsigned int      val);
00474 int ipmi_lanconfig_get_dest_vlan_tag(ipmi_lan_config_t *lanc,
00475                                      unsigned int      dest,
00476                                      unsigned int      *val);
00477 int ipmi_lanconfig_set_dest_vlan_tag(ipmi_lan_config_t *lanc,
00478                                      unsigned int      dest,
00479                                      unsigned int      val);
00480 
00481 /* VLAN support */
00482 int ipmi_lanconfig_get_vlan_id(ipmi_lan_config_t *lanc,
00483                                unsigned int      *val);
00484 int ipmi_lanconfig_set_vlan_id(ipmi_lan_config_t *lanc,
00485                                unsigned int      val);
00486 int ipmi_lanconfig_get_vlan_id_enable(ipmi_lan_config_t *lanc,
00487                                       unsigned int      *val);
00488 int ipmi_lanconfig_set_vlan_id_enable(ipmi_lan_config_t *lanc,
00489                                       unsigned int      val);
00490 int ipmi_lanconfig_get_vlan_priority(ipmi_lan_config_t *lanc,
00491                                      unsigned int      *val);
00492 int ipmi_lanconfig_set_vlan_priority(ipmi_lan_config_t *lanc,
00493                                      unsigned int      val);
00494 
00495 /* Cipher Suites */
00496 unsigned int ipmi_lanconfig_get_num_cipher_suites(ipmi_lan_config_t *lanc);
00497                                            
00498 int ipmi_lanconfig_get_cipher_suite_entry(ipmi_lan_config_t *lanc,
00499                                           unsigned int      entry,
00500                                           unsigned int      *val);
00501 int ipmi_lanconfig_set_cipher_suite_entry(ipmi_lan_config_t *lanc,
00502                                           unsigned int      entry,
00503                                           unsigned int      val);
00504 int ipmi_lanconfig_get_max_priv_for_cipher_suite(ipmi_lan_config_t *lanc,
00505                                                  unsigned int      entry,
00506                                                  unsigned int      *val);
00507 int ipmi_lanconfig_set_max_priv_for_cipher_suite(ipmi_lan_config_t *lanc,
00508                                                  unsigned int      entry,
00509                                                  unsigned int      val);
00510 
00511 #ifdef __cplusplus
00512 }
00513 #endif
00514 
00515 #endif /* _IPMI_LANPARM_H */

© sourcejam.com 2005-2008