Changeset View
Changeset View
Standalone View
Standalone View
sys/cam/ctl/ctl.h
Show First 20 Lines • Show All 190 Lines • ▼ Show 20 Lines | |||||
uint64_t ctl_encode_lun(uint32_t decoded); | uint64_t ctl_encode_lun(uint32_t decoded); | ||||
void ctl_isc_announce_lun(struct ctl_lun *lun); | void ctl_isc_announce_lun(struct ctl_lun *lun); | ||||
void ctl_isc_announce_port(struct ctl_port *port); | void ctl_isc_announce_port(struct ctl_port *port); | ||||
void ctl_isc_announce_iid(struct ctl_port *port, int iid); | void ctl_isc_announce_iid(struct ctl_port *port, int iid); | ||||
void ctl_isc_announce_mode(struct ctl_lun *lun, uint32_t initidx, | void ctl_isc_announce_mode(struct ctl_lun *lun, uint32_t initidx, | ||||
uint8_t page, uint8_t subpage); | uint8_t page, uint8_t subpage); | ||||
/* | |||||
* KPI to manipulate LUN/port options | |||||
*/ | |||||
struct ctl_option { | |||||
STAILQ_ENTRY(ctl_option) links; | |||||
char *name; | |||||
char *value; | |||||
}; | |||||
typedef STAILQ_HEAD(ctl_options, ctl_option) ctl_options_t; | |||||
struct ctl_be_arg; | |||||
void ctl_init_opts(ctl_options_t *opts, int num_args, struct ctl_be_arg *args); | |||||
void ctl_update_opts(ctl_options_t *opts, int num_args, | |||||
struct ctl_be_arg *args); | |||||
void ctl_free_opts(ctl_options_t *opts); | |||||
char * ctl_get_opt(ctl_options_t *opts, const char *name); | |||||
int ctl_get_opt_number(ctl_options_t *opts, const char *name, uint64_t *num); | |||||
int ctl_expand_number(const char *buf, uint64_t *num); | int ctl_expand_number(const char *buf, uint64_t *num); | ||||
#endif /* _KERNEL */ | #endif /* _KERNEL */ | ||||
#endif /* _CTL_H_ */ | #endif /* _CTL_H_ */ | ||||
/* | /* | ||||
* vim: ts=8 | * vim: ts=8 | ||||
*/ | */ |