/** @file
Translate the IPv4 address into a network name
Copyright (c) 2011, Intel Corporation
All rights reserved. This program and the accompanying materials
are licensed and made available under the terms and conditions of the BSD License
which accompanies this distribution. The full text of the license may be found at
THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS,
WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED.
**/
#include <errno.h>
#include <netdb.h>
#include <stdio.h>
#include <string.h>
#include <Uefi.h>
#include <unistd.h>
#include <Library/DebugLib.h>
/**
Translate the IPv4 address into a network name
@param [in] Argc The number of arguments
@param [in] Argv The argument value array
@retval 0 The application exited normally.
@retval Other An error occurred.
**/
int
main (
)
{
//
// Determine if the IPv4 address is specified
//
if (( 2 != Argc )
"%d.%d.%d.%d",
&RemoteAddress[0],
&RemoteAddress[1],
&RemoteAddress[2],
&RemoteAddress[3]))
|| ( 255 < RemoteAddress[0])
}
else {
//
// Translate the address into a network name
//
}
else {
Print ( L"%a: %d.%d.%d.%d, 0x%08x\r\n",
IpAddress[0],
IpAddress[1],
IpAddress[2],
IpAddress[3],
}
}
//
// All done
//
return errno;
}