#include <OpenIPMI/ipmi_types.h>Go to the source code of this file.
|
|
Definition at line 114 of file ipmi_lanparm.h. |
|
|
Definition at line 113 of file ipmi_lanparm.h. |
|
|
Definition at line 126 of file ipmi_lanparm.h. |
|
|
Definition at line 127 of file ipmi_lanparm.h. |
|
|
Definition at line 122 of file ipmi_lanparm.h. |
|
|
Definition at line 136 of file ipmi_lanparm.h. Referenced by got_parm(), and set_done(). |
|
|
Definition at line 135 of file ipmi_lanparm.h. |
|
|
Definition at line 128 of file ipmi_lanparm.h. |
|
|
Definition at line 124 of file ipmi_lanparm.h. |
|
|
Definition at line 125 of file ipmi_lanparm.h. |
|
|
Definition at line 131 of file ipmi_lanparm.h. Referenced by got_parm(), ipmi_pet_create_mc(), and set_done(). |
|
|
Definition at line 130 of file ipmi_lanparm.h. Referenced by got_parm(), ipmi_pet_create_mc(), set_done(), and start_pet_setup(). |
|
|
Definition at line 137 of file ipmi_lanparm.h. Referenced by got_parm(), and set_done(). |
|
|
Definition at line 123 of file ipmi_lanparm.h. |
|
|
Definition at line 115 of file ipmi_lanparm.h. |
|
|
Definition at line 116 of file ipmi_lanparm.h. |
|
|
Definition at line 119 of file ipmi_lanparm.h. |
|
|
Definition at line 117 of file ipmi_lanparm.h. |
|
|
Definition at line 81 of file ipmi_lanparm.h. Referenced by for_each_lanparm_handler(), lanparm_config_get_done(), lanparm_info(), lanparm_list_handler(), and lanparm_new(). |
|
|
Definition at line 134 of file ipmi_lanparm.h. Referenced by got_parm(). |
|
|
Definition at line 129 of file ipmi_lanparm.h. Referenced by got_parm(), and set_done(). |
|
|
Definition at line 120 of file ipmi_lanparm.h. |
|
|
Definition at line 121 of file ipmi_lanparm.h. |
|
|
Definition at line 112 of file ipmi_lanparm.h. |
|
|
Definition at line 118 of file ipmi_lanparm.h. |
|
|
Definition at line 132 of file ipmi_lanparm.h. Referenced by got_parm(), and set_done(). |
|
|
Definition at line 133 of file ipmi_lanparm.h. |
|
|
Definition at line 142 of file ipmi_lanparm.h. |
|
|
Definition at line 149 of file ipmi_lanparm.h. |
|
|
Definition at line 48 of file ipmi_lanparm.h. |
|
|
Definition at line 91 of file ipmi_lanparm.h. |
|
|
Definition at line 53 of file ipmi_lanparm.h. |
|
|
Definition at line 44 of file ipmi_lanparm.h. |
|
|
Definition at line 186 of file ipmi_lanparm.h. 00186 { IPMI_LANCONFIG_INT, IPMI_LANCONFIG_BOOL, 00187 IPMI_LANCONFIG_DATA, 00188 IPMI_LANCONFIG_IP, IPMI_LANCONFIG_MAC };
|
|
||||||||||||||||||||
|
Definition at line 1968 of file lanparm.c. References ipmi_lanparm_set_parm(), ipmi_mem_alloc(), ipmi_mem_free(), ipmi_lan_config_s::lan_locked, lanparm_get(), lock_cleared(), and ipmi_lan_config_s::my_lan. Referenced by clearlanparmlock_cmd(), lanparm_config_unlock(), and lanparm_unlock_mc(). 01972 { 01973 unsigned char data[1]; 01974 int rv; 01975 clear_lock_t *cl; 01976 01977 if (lanc) { 01978 if (lanc->my_lan != lanparm) 01979 return EINVAL; 01980 01981 if (!lanc->lan_locked) 01982 return EINVAL; 01983 } 01984 01985 cl = ipmi_mem_alloc(sizeof(*cl)); 01986 if (!cl) 01987 return ENOMEM; 01988 cl->done = done; 01989 cl->cb_data = cb_data; 01990 01991 data[0] = 0; /* Clear the lock. */ 01992 rv = ipmi_lanparm_set_parm(lanparm, 0, data, 1, lock_cleared, cl); 01993 if (rv) { 01994 ipmi_mem_free(cl); 01995 } else { 01996 if (lanc) 01997 lanc->lan_locked = 0; 01998 lanparm_get(lanparm); 01999 } 02000 02001 return rv; 02002 }
|
|
|
Definition at line 2005 of file lanparm.c. References ipmi_lan_config_s::alert_dest_addr, ipmi_lan_config_s::alert_dest_type, and ipmi_mem_free(). Referenced by config_destroy_handler(), err_lock_cleared(), got_parm(), ipmi_lan_get_config(), ipmi_lan_set_config(), lanparm_config_close(), lanparm_config_get_done(), leave(), lock_done(), readlanparm_mc_handler(), and set_clear(). 02006 { 02007 if (lanc->alert_dest_type != NULL) 02008 ipmi_mem_free(lanc->alert_dest_type); 02009 if (lanc->alert_dest_addr != NULL) 02010 ipmi_mem_free(lanc->alert_dest_addr); 02011 ipmi_mem_free(lanc); 02012 }
|
|
||||||||||||||||
|
Definition at line 1687 of file lanparm.c. References ipmi_lan_free_config(), ipmi_lanparm_set_parm(), ipmi_mem_alloc(), lanparm_get(), lanparm_put(), and lock_done(). Referenced by lanparm_config_get(), and readlanparm_mc_handler(). 01690 { 01691 ipmi_lan_config_t *lanc; 01692 int rv; 01693 unsigned char data[1]; 01694 01695 lanc = ipmi_mem_alloc(sizeof(*lanc)); 01696 if (!lanc) 01697 return ENOMEM; 01698 memset(lanc, 0, sizeof(*lanc)); 01699 01700 lanc->curr_parm = 1; 01701 lanc->curr_sel = 0; 01702 lanc->done = done; 01703 lanc->cb_data = cb_data; 01704 lanc->my_lan = lanparm; 01705 lanc->lock_supported = 1; /* Assume it works */ 01706 01707 lanparm_get(lanparm); 01708 01709 /* First grab the lock */ 01710 data[0] = 1; /* Set in progress. */ 01711 rv = ipmi_lanparm_set_parm(lanparm, 0, data, 1, lock_done, lanc); 01712 if (rv) { 01713 ipmi_lan_free_config(lanc); 01714 lanparm_put(lanparm); 01715 } 01716 01717 return rv; 01718 }
|
|
||||||||||||||||||||
|
Definition at line 1875 of file lanparm.c. References ipmi_lan_config_s::alert_dest_addr, ipmi_lan_config_s::alert_dest_type, ipmi_lan_free_config(), ipmi_lanparm_set_parm(), ipmi_mem_alloc(), ipmi_lan_config_s::lan_locked, lanparm_get(), lanparms_s::length, MAX_IPMI_DATA_SIZE, ipmi_lan_config_s::my_lan, set_done(), and lanparms_s::set_handler. Referenced by lanparm_config_set(), and writelanparm_cmd(). 01879 { 01880 ipmi_lan_config_t *lanc; 01881 unsigned char data[MAX_IPMI_DATA_SIZE]; 01882 lanparms_t *lp; 01883 int rv; 01884 01885 if (olanc->my_lan != lanparm) 01886 return EINVAL; 01887 01888 if (!olanc->lan_locked) 01889 return EINVAL; 01890 01891 lanc = ipmi_mem_alloc(sizeof(*lanc)); 01892 if (!lanc) 01893 return ENOMEM; 01894 01895 *lanc = *olanc; 01896 lanc->alert_dest_type = NULL; 01897 lanc->alert_dest_addr = NULL; 01898 lanc->err = 0; 01899 lanc->lan_locked = 0; /* Set this here, since we will unlock it, 01900 but we don't want the free operation to 01901 attempt an unlock */ 01902 01903 if (lanc->num_alert_destinations) { 01904 lanc->alert_dest_type 01905 = ipmi_mem_alloc(sizeof(alert_dest_type_t) 01906 * lanc->num_alert_destinations); 01907 if (!lanc->alert_dest_type) { 01908 rv = ENOMEM; 01909 goto out; 01910 } 01911 memcpy(lanc->alert_dest_type, olanc->alert_dest_type, 01912 sizeof(alert_dest_type_t) * lanc->num_alert_destinations); 01913 01914 lanc->alert_dest_addr 01915 = ipmi_mem_alloc(sizeof(alert_dest_addr_t) 01916 * lanc->num_alert_destinations); 01917 if (!lanc->alert_dest_addr) { 01918 rv = ENOMEM; 01919 goto out; 01920 } 01921 memcpy(lanc->alert_dest_addr, olanc->alert_dest_addr, 01922 sizeof(alert_dest_addr_t) * lanc->num_alert_destinations); 01923 } 01924 01925 lanc->curr_parm = 2; 01926 lanc->curr_sel = 0; 01927 lanc->set_done = done; 01928 lanc->cb_data = cb_data; 01929 01930 /* Parm 2 is known good for writing. */ 01931 lp = &(lanparms[lanc->curr_parm]); 01932 lp->set_handler(lanc, lp, data); 01933 rv = ipmi_lanparm_set_parm(lanparm, lanc->curr_parm, 01934 data, lp->length, set_done, lanc); 01935 out: 01936 if (rv) { 01937 ipmi_lan_free_config(lanc); 01938 } else { 01939 /* The old config no longer holds the lock. */ 01940 olanc->lan_locked = 0; 01941 lanparm_get(lanparm); 01942 } 01943 return rv; 01944 }
|
|
|
Definition at line 2764 of file lanparm.c. References ipmi_mem_free(). 02765 { 02766 ipmi_mem_free(data); 02767 }
|
|
||||||||||||||||
|
Definition at line 2607 of file lanparm.c. 02608 { 02609 char *rval; 02610 02611 if ((parm < 10) || (parm > 14)) 02612 return ENOSYS; 02613 02614 switch (idx) { 02615 case 0: rval = "callback"; break; 02616 case 1: rval = "user"; break; 02617 case 2: rval = "operator"; break; 02618 case 3: rval = "admin"; break; 02619 case 4: rval = "oem"; break; 02620 default: return EINVAL; 02621 } 02622 02623 if (sval) 02624 *sval = rval; 02625 02626 return 0; 02627 }
|
|
||||||||||||||||||||
|
Definition at line 2514 of file lanparm.c. 02516 { 02517 char *rval; 02518 int rnval; 02519 if (parm == 5) { /* ip_addr_source */ 02520 if (val < 0) { 02521 if (nval) 02522 *nval = 0; 02523 return EINVAL; 02524 } 02525 switch (val) { 02526 case 0: 02527 rval = "unspecified"; 02528 rnval = 1; 02529 break; 02530 case 1: 02531 rval = "manually configured"; 02532 rnval = 2; 02533 break; 02534 case 2: 02535 rval = "DHCP"; 02536 rnval = 3; 02537 break; 02538 case 3: 02539 rval = "BIOS configured"; 02540 rnval = 4; 02541 break; 02542 case 4: 02543 rval = "other protocol"; 02544 rnval = -1; 02545 break; 02546 default: 02547 if (*nval) 02548 *nval = -1; 02549 return EINVAL; 02550 } 02551 } else if (parm == 43) { /* cipher_suite_entry */ 02552 if (val < 0) { 02553 if (nval) 02554 *nval = 0; 02555 return EINVAL; 02556 } 02557 switch (val) { 02558 case 0: rval = "RAKP-none,none,none"; rnval = 1; break; 02559 case 1: rval = "RAKP-HMAC-SHA1,none,none"; rnval = 2; break; 02560 case 2: rval = "RAKP-HMAC-SHA1,HMAC-SHA1-96,none"; rnval = 3; break; 02561 case 3: rval = "RAKP-HMAC-SHA1,HMAC-SHA1-96,AES-CBC-128"; rnval = 4; break; 02562 case 4: rval = "RAKP-HMAC-SHA1,HMAC-SHA1-96,xRC4-128"; rnval = 5; break; 02563 case 5: rval = "RAKP-HMAC-SHA1,HMAC-SHA1-96,xRC4-40"; rnval = 6; break; 02564 case 6: rval = "RAKP-HMAC-MD5,none,none"; rnval = 7; break; 02565 case 7: rval = "RAKP-HMAC-MD5,HMAC-MD5-128,none"; rnval = 8; break; 02566 case 8: rval = "RAKP-HMAC-MD5,HMAC-MD5-128,AES-CBC-128"; rnval = 9; break; 02567 case 9: rval = "RAKP-HMAC-MD5,HMAC-MD5-128,xRC4-128"; rnval = 10; break; 02568 case 10: rval = "RAKP-HMAC-MD5,HMAC-MD5-128,xRC4-40"; rnval = 11; break; 02569 case 11: rval = "RAKP-HMAC-MD5,MD5-128,none"; rnval = 12; break; 02570 case 12: rval = "RAKP-HMAC-MD5,MD5-128,AES-CBC-128"; rnval = 13; break; 02571 case 13: rval = "RAKP-HMAC-MD5,MD5-128,xRC4-128"; rnval = 14; break; 02572 case 14: rval = "RAKP-HMAC-MD5,MD5-128,xRC4-40"; rnval = -1; break; 02573 default: 02574 if (*nval) 02575 *nval = -1; 02576 return EINVAL; 02577 } 02578 } else if (parm == 44) { /* max_priv_for_cipher_suite */ 02579 if (val < 0) { 02580 if (nval) 02581 *nval = 0; 02582 return EINVAL; 02583 } 02584 switch (val) { 02585 case 0: rval = "disabled"; rnval = 1; break; 02586 case 1: rval = "callback"; rnval = 2; break; 02587 case 2: rval = "user"; rnval = 3; break; 02588 case 3: rval = "admin"; rnval = 4; break; 02589 case 4: rval = "oem"; rnval = -1; break; 02590 default: 02591 if (*nval) 02592 *nval = -1; 02593 return EINVAL; 02594 } 02595 } else { 02596 return ENOSYS; 02597 } 02598 02599 if (sval) 02600 *sval = rval; 02601 if (nval) 02602 *nval = rnval; 02603 return 0; 02604 }
|
|
||||||||||||||||
|
Referenced by display_lanparm_config(). |
|
||||||||||||||||
|
Referenced by display_lanparm_config(). |
|
||||||||||||||||
|
Referenced by display_lanparm_config(). |
|
||||||||||||||||
|
Referenced by display_lanparm_config(). |
|
||||||||||||
|
Referenced by display_lanparm_config(). |
|
||||||||||||
|
Referenced by display_lanparm_config(). |
|
||||||||||||||||
|
Definition at line 2329 of file lanparm.c. References ipmi_lan_config_s::cipher_suite_entries, and ipmi_lan_config_s::num_cipher_suites. 02332 { 02333 if (entry >= lanc->num_cipher_suites) 02334 return EINVAL; 02335 *val = lanc->cipher_suite_entries[entry]; 02336 return 0; 02337 }
|
|