static abi_long target_to_host_data_route(struct nlmsghdr *nlh)

{

    struct ifinfomsg *ifi;

    struct ifaddrmsg *ifa;

    struct rtmsg *rtm;



    switch (nlh->nlmsg_type) {

    case RTM_GETLINK:

        break;

    case RTM_NEWLINK:

    case RTM_DELLINK:

        ifi = NLMSG_DATA(nlh);

        ifi->ifi_type = tswap16(ifi->ifi_type);

        ifi->ifi_index = tswap32(ifi->ifi_index);

        ifi->ifi_flags = tswap32(ifi->ifi_flags);

        ifi->ifi_change = tswap32(ifi->ifi_change);

        target_to_host_link_rtattr(IFLA_RTA(ifi), nlh->nlmsg_len -

                                   NLMSG_LENGTH(sizeof(*ifi)));

        break;

    case RTM_GETADDR:

    case RTM_NEWADDR:

    case RTM_DELADDR:

        ifa = NLMSG_DATA(nlh);

        ifa->ifa_index = tswap32(ifa->ifa_index);

        target_to_host_addr_rtattr(IFA_RTA(ifa), nlh->nlmsg_len -

                                   NLMSG_LENGTH(sizeof(*ifa)));

        break;

    case RTM_GETROUTE:

        break;

    case RTM_NEWROUTE:

    case RTM_DELROUTE:

        rtm = NLMSG_DATA(nlh);

        rtm->rtm_flags = tswap32(rtm->rtm_flags);

        target_to_host_route_rtattr(RTM_RTA(rtm), nlh->nlmsg_len -

                                    NLMSG_LENGTH(sizeof(*rtm)));

        break;

    default:

        return -TARGET_EOPNOTSUPP;

    }

    return 0;

}

static abi_long target_to_host_data_route(struct nlmsghdr *nlh)

{

    struct ifinfomsg *ifi;

    struct ifaddrmsg *ifa;

    struct rtmsg *rtm;



    switch (nlh->nlmsg_type) {

    case RTM_GETLINK:

        break;

    case RTM_NEWLINK:

    case RTM_DELLINK:

        ifi = NLMSG_DATA(nlh);

        ifi->ifi_type = tswap16(ifi->ifi_type);

        ifi->ifi_index = tswap32(ifi->ifi_index);

        ifi->ifi_flags = tswap32(ifi->ifi_flags);

        ifi->ifi_change = tswap32(ifi->ifi_change);

        target_to_host_link_rtattr(IFLA_RTA(ifi), nlh->nlmsg_len -

                                   NLMSG_LENGTH(sizeof(*ifi)));

        break;

    case RTM_GETADDR:

    case RTM_NEWADDR:

    case RTM_DELADDR:

        ifa = NLMSG_DATA(nlh);

        ifa->ifa_index = tswap32(ifa->ifa_index);

        target_to_host_addr_rtattr(IFA_RTA(ifa), nlh->nlmsg_len -

                                   NLMSG_LENGTH(sizeof(*ifa)));

        break;

    case RTM_GETROUTE:

        break;

    case RTM_NEWROUTE:

    case RTM_DELROUTE:

        rtm = NLMSG_DATA(nlh);

        rtm->rtm_flags = tswap32(rtm->rtm_flags);

        target_to_host_route_rtattr(RTM_RTA(rtm), nlh->nlmsg_len -

                                    NLMSG_LENGTH(sizeof(*rtm)));

        break;

    default:

        return -TARGET_EOPNOTSUPP;

    }

    return 0;

}

        ifi = NLMSG_DATA(nlh);         ifi->ifi_type = tswap16(ifi->ifi_type);         ifi->ifi_index = tswap32(ifi->ifi_index);         ifi->ifi_flags = tswap32(ifi->ifi_flags);         ifi->ifi_change = tswap32(ifi->ifi_change);         ifa = NLMSG_DATA(nlh);         ifa->ifa_index = tswap32(ifa->ifa_index);         rtm = NLMSG_DATA(nlh);         rtm->rtm_flags = tswap32(rtm->rtm_flags);         ifi = NLMSG_DATA(nlh);         ifi->ifi_type = tswap16(ifi->ifi_type);         ifi->ifi_index = tswap32(ifi->ifi_index);         ifi->ifi_flags = tswap32(ifi->ifi_flags);         ifi->ifi_change = tswap32(ifi->ifi_change);         target_to_host_link_rtattr(IFLA_RTA(ifi), nlh->nlmsg_len -                                    NLMSG_LENGTH(sizeof(*ifi)));         ifa = NLMSG_DATA(nlh);         ifa->ifa_index = tswap32(ifa->ifa_index);         target_to_host_addr_rtattr(IFA_RTA(ifa), nlh->nlmsg_len -                                    NLMSG_LENGTH(sizeof(*ifa)));         rtm = NLMSG_DATA(nlh);         rtm->rtm_flags = tswap32(rtm->rtm_flags);         target_to_host_route_rtattr(RTM_RTA(rtm), nlh->nlmsg_len -                                     NLMSG_LENGTH(sizeof(*rtm)));
static abi_long FUNC_0(struct nlmsghdr *nlh)

{

    struct ifinfomsg *VAR_0;

    struct ifaddrmsg *VAR_1;

    struct rtmsg *VAR_2;



    switch (nlh->nlmsg_type) {

    case RTM_GETLINK:

        break;

    case RTM_NEWLINK:

    case RTM_DELLINK:

        VAR_0 = NLMSG_DATA(nlh);

        VAR_0->ifi_type = tswap16(VAR_0->ifi_type);

        VAR_0->ifi_index = tswap32(VAR_0->ifi_index);

        VAR_0->ifi_flags = tswap32(VAR_0->ifi_flags);

        VAR_0->ifi_change = tswap32(VAR_0->ifi_change);

        target_to_host_link_rtattr(IFLA_RTA(VAR_0), nlh->nlmsg_len -

                                   NLMSG_LENGTH(sizeof(*VAR_0)));

        break;

    case RTM_GETADDR:

    case RTM_NEWADDR:

    case RTM_DELADDR:

        VAR_1 = NLMSG_DATA(nlh);

        VAR_1->ifa_index = tswap32(VAR_1->ifa_index);

        target_to_host_addr_rtattr(IFA_RTA(VAR_1), nlh->nlmsg_len -

                                   NLMSG_LENGTH(sizeof(*VAR_1)));

        break;

    case RTM_GETROUTE:

        break;

    case RTM_NEWROUTE:

    case RTM_DELROUTE:

        VAR_2 = NLMSG_DATA(nlh);

        VAR_2->rtm_flags = tswap32(VAR_2->rtm_flags);

        target_to_host_route_rtattr(RTM_RTA(VAR_2), nlh->nlmsg_len -

                                    NLMSG_LENGTH(sizeof(*VAR_2)));

        break;

    default:

        return -TARGET_EOPNOTSUPP;

    }

    return 0;

}

static abi_long FUNC_0(struct nlmsghdr *nlh)
{ struct ifinfomsg *VAR_0; struct ifaddrmsg *VAR_1; struct rtmsg *VAR_2; switch (nlh->nlmsg_type) { case RTM_GETLINK:
break; case RTM_NEWLINK:
case RTM_DELLINK:
VAR_0 = NLMSG_DATA(nlh); VAR_0->ifi_type = tswap16(VAR_0->ifi_type); VAR_0->ifi_index = tswap32(VAR_0->ifi_index); VAR_0->ifi_flags = tswap32(VAR_0->ifi_flags); VAR_0->ifi_change = tswap32(VAR_0->ifi_change); target_to_host_link_rtattr(IFLA_RTA(VAR_0), nlh->nlmsg_len -
NLMSG_LENGTH(sizeof(*VAR_0))); break; case RTM_GETADDR:
case RTM_NEWADDR:
case RTM_DELADDR:
VAR_1 = NLMSG_DATA(nlh); VAR_1->ifa_index = tswap32(VAR_1->ifa_index); target_to_host_addr_rtattr(IFA_RTA(VAR_1), nlh->nlmsg_len -
NLMSG_LENGTH(sizeof(*VAR_1))); break; case RTM_GETROUTE:
break; case RTM_NEWROUTE:
case RTM_DELROUTE:
VAR_2 = NLMSG_DATA(nlh); VAR_2->rtm_flags = tswap32(VAR_2->rtm_flags); target_to_host_route_rtattr(RTM_RTA(VAR_2), nlh->nlmsg_len -
NLMSG_LENGTH(sizeof(*VAR_2))); break; default:
return -TARGET_EOPNOTSUPP; } return 0; }