iPXE
Data Structures | Functions | Variables
comboot_resolv.c File Reference
#include <errno.h>
#include <comboot.h>
#include <ipxe/in.h>
#include <ipxe/list.h>
#include <ipxe/process.h>
#include <ipxe/resolv.h>

Go to the source code of this file.

Data Structures

struct  comboot_resolver

Functions

 FILE_LICENCE (GPL2_OR_LATER)
static void comboot_resolv_close (struct comboot_resolver *comboot_resolver, int rc)
static void comboot_resolv_done (struct comboot_resolver *comboot_resolver, struct sockaddr *sa)
int comboot_resolv (const char *name, struct in_addr *address)

Variables

static struct interface_operation comboot_resolv_op []
static struct interface_descriptor comboot_resolv_desc
static struct comboot_resolver comboot_resolver

Function Documentation

FILE_LICENCE ( GPL2_OR_LATER  )
static void comboot_resolv_close ( struct comboot_resolver comboot_resolver,
int  rc 
) [static]

Definition at line 16 of file comboot_resolv.c.

References comboot_resolver::intf, intf_shutdown(), comboot_resolver::rc, and rc.

                                            {
        comboot_resolver->rc = rc;
        intf_shutdown ( &comboot_resolver->intf, rc );
}
static void comboot_resolv_done ( struct comboot_resolver comboot_resolver,
struct sockaddr sa 
) [static]

Definition at line 22 of file comboot_resolv.c.

References comboot_resolver::addr, AF_INET, sockaddr::sa_family, sin, and sockaddr_in::sin_addr.

                                                        {
        struct sockaddr_in *sin;

        if ( sa->sa_family == AF_INET ) {
                sin = ( ( struct sockaddr_in * ) sa );
                comboot_resolver->addr = sin->sin_addr;
        }
}
int comboot_resolv ( const char *  name,
struct in_addr address 
)

Variable Documentation

Initial value:

Definition at line 32 of file comboot_resolv.c.

Initial value:

Definition at line 37 of file comboot_resolv.c.

Initial value:
 {
        .intf = INTF_INIT ( comboot_resolv_desc ),
}

Definition at line 40 of file comboot_resolv.c.