本文整理汇总了C++中LIST_TAIL_DATA函数的典型用法代码示例。如果您正苦于以下问题:C++ LIST_TAIL_DATA函数的具体用法?C++ LIST_TAIL_DATA怎么用?C++ LIST_TAIL_DATA使用的例子?那么恭喜您, 这里精选的函数代码示例或许可以为您提供帮助。
在下文中一共展示了LIST_TAIL_DATA函数的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C++代码示例。
示例1: notify_up_handler
static void
notify_up_handler(vector_t *strvec)
{
virtual_server_t *vs = LIST_TAIL_DATA(check_data->vs);
real_server_t *rs = LIST_TAIL_DATA(vs->rs);
rs->notify_up = set_value(strvec);
}
示例2: inhibit_handler
static void
inhibit_handler(vector_t *strvec)
{
virtual_server_t *vs = LIST_TAIL_DATA(check_data->vs);
real_server_t *rs = LIST_TAIL_DATA(vs->rs);
rs->inhibit = 1;
}
示例3: lthreshold_handler
static void
lthreshold_handler(vector_t *strvec)
{
virtual_server_t *vs = LIST_TAIL_DATA(check_data->vs);
real_server_t *rs = LIST_TAIL_DATA(vs->rs);
rs->l_threshold = atoi(vector_slot(strvec, 1));
}
示例4: lthreshold_handler
static void
lthreshold_handler(vector strvec)
{
virtual_server *vs = LIST_TAIL_DATA(check_data->vs);
real_server *rs = LIST_TAIL_DATA(vs->rs);
rs->l_threshold = atoi(VECTOR_SLOT(strvec, 1));
}
示例5: weight_handler
static void
weight_handler(vector_t *strvec)
{
virtual_server_t *vs = LIST_TAIL_DATA(check_data->vs);
real_server_t *rs = LIST_TAIL_DATA(vs->rs);
rs->weight = atoi(vector_slot(strvec, 1));
rs->iweight = rs->weight;
}
示例6: checker_set_dst
/* Set dst */
void
checker_set_dst(struct sockaddr_storage *dst)
{
virtual_server_t *vs = LIST_TAIL_DATA(check_data->vs);
real_server_t *rs = LIST_TAIL_DATA(vs->rs);
*dst = rs->addr;
}
示例7: weight_handler
static void
weight_handler(vector strvec)
{
virtual_server *vs = LIST_TAIL_DATA(check_data->vs);
real_server *rs = LIST_TAIL_DATA(vs->rs);
rs->weight = atoi(VECTOR_SLOT(strvec, 1));
rs->iweight = rs->weight;
}
示例8: vrrp_notify_handler
static void
vrrp_notify_handler(vector_t *strvec)
{
vrrp_t *vrrp = LIST_TAIL_DATA(vrrp_data->vrrp);
vrrp->script = set_value(strvec);
vrrp->notify_exec = 1;
}
示例9: vrrp_vmac_xmit_base_handler
static void
vrrp_vmac_xmit_base_handler(vector_t *strvec)
{
vrrp_t *vrrp = LIST_TAIL_DATA(vrrp_data->vrrp);
__set_bit(VRRP_VMAC_XMITBASE_BIT, &vrrp->vmac_flags);
}
示例10: vrrp_gnotify_handler
static void
vrrp_gnotify_handler(vector_t *strvec)
{
vrrp_sgroup_t *vgroup = LIST_TAIL_DATA(vrrp_data->vrrp_sync_group);
vgroup->script = set_value(strvec);
vgroup->notify_exec = 1;
}
示例11: vrrp_vmac_xmit_base_handler
static void
vrrp_vmac_xmit_base_handler(vector_t *strvec)
{
vrrp_t *vrrp = LIST_TAIL_DATA(vrrp_data->vrrp);
if (vrrp->vmac_flags & VRRP_VMAC_FL_SET)
vrrp->vmac_flags |= VRRP_VMAC_FL_XMITBASE;
}
示例12: vrrp_vmac_handler
static void
vrrp_vmac_handler(vector_t *strvec)
{
vrrp_t *vrrp = LIST_TAIL_DATA(vrrp_data->vrrp);
vrrp->vmac |= 1;
if (!vrrp->saddr)
vrrp->saddr = IF_ADDR(vrrp->ifp);
if (vector_size(strvec) == 2) {
strncpy(vrrp->vmac_ifname, vector_slot(strvec, 1),
IFNAMSIZ - 1);
} else if (vrrp->vrid) {
snprintf(vrrp->vmac_ifname, IFNAMSIZ, "vrrp.%d", vrrp->vrid);
}
if (strlen(vrrp->vmac_ifname)) {
log_message(LOG_INFO, "vmac_ifname=%s for vrrp_instace %s"
, vrrp->vmac_ifname
, vrrp->iname);
}
if (vrrp->ifp && !(vrrp->vmac & 2)) {
unsigned int base_ifindex = vrrp->ifp->base_ifindex;
netlink_link_add_vmac(vrrp);
/* restore base ifindex (deleted when adding VMAC) */
vrrp->ifp->base_ifindex = base_ifindex;
}
/* flag interface as a VMAC interface */
vrrp->ifp->vmac = 1;
}
示例13: vrrp_notify_master_handler
static void
vrrp_notify_master_handler(vector strvec)
{
vrrp_rt *vrrp = LIST_TAIL_DATA(vrrp_data->vrrp);
vrrp->script_master = set_value(strvec);
vrrp->notify_exec = 1;
}
示例14: laddr_gname_handler
static void
laddr_gname_handler(vector_t *strvec)
{
virtual_server_t *vs = LIST_TAIL_DATA(check_data->vs);
vs->local_addr_gname = set_value(strvec);
}
示例15: bfd_nbrip_handler
static void
bfd_nbrip_handler(vector_t *strvec)
{
bfd_t *bfd;
struct sockaddr_storage nbr_addr;
assert(strvec);
assert(bfd_data);
bfd = LIST_TAIL_DATA(bfd_data->bfd);
assert(bfd);
if (!strcmp(vector_slot(strvec, 1), "neighbour_ip"))
neighbor_str = "neighbour";
if (inet_stosockaddr(strvec_slot(strvec, 1), BFD_CONTROL_PORT, &nbr_addr)) {
report_config_error(CONFIG_GENERAL_ERROR,
"Configuration error: BFD instance %s has"
" malformed %s address %s, ignoring instance",
bfd->iname, neighbor_str, FMT_STR_VSLOT(strvec, 1));
list_del(bfd_data->bfd, bfd);
skip_block(false);
return;
} else if (find_bfd_by_addr(&nbr_addr)) {
report_config_error(CONFIG_GENERAL_ERROR,
"Configuration error: BFD instance %s has"
" duplicate %s address %s, ignoring instance",
bfd->iname, neighbor_str, FMT_STR_VSLOT(strvec, 1));
list_del(bfd_data->bfd, bfd);
skip_block(false);
return;
} else
bfd->nbr_addr = nbr_addr;
}