Lines Matching refs:request
51 } request; in setDefaultGateway() local
53 memset(&request, 0, sizeof(request)); in setDefaultGateway()
56 request.hdr.nlmsg_len = NLMSG_LENGTH(sizeof(request.msg)); in setDefaultGateway()
57 request.hdr.nlmsg_type = RTM_NEWROUTE; in setDefaultGateway()
58 request.hdr.nlmsg_flags = NLM_F_REQUEST | NLM_F_CREATE; in setDefaultGateway()
60 request.msg.rtm_family = AF_INET; in setDefaultGateway()
61 request.msg.rtm_dst_len = 0; in setDefaultGateway()
62 request.msg.rtm_table = RT_TABLE_MAIN; in setDefaultGateway()
63 request.msg.rtm_protocol = RTPROT_BOOT; in setDefaultGateway()
64 request.msg.rtm_scope = RT_SCOPE_UNIVERSE; in setDefaultGateway()
65 request.msg.rtm_type = RTN_UNICAST; in setDefaultGateway()
67 addRouterAttribute(request, RTA_GATEWAY, &gateway, sizeof(gateway)); in setDefaultGateway()
68 addRouterAttribute(request, RTA_OIF, &ifaceIndex, sizeof(ifaceIndex)); in setDefaultGateway()
70 return sendNetlinkMessage(&request, request.hdr.nlmsg_len); in setDefaultGateway()