Showing results for 
Search instead for 
Did you mean: 

Converting IP address in Binary to Std format??


I am using the EPOEvents table and I need to convert the IP address field in the std format (

I have used this function to atleast convert this to binary from default int format. But I am not able to convert this further to

std format


Please help..



Tags (3)
4 Replies
McAfee Employee spamidi
McAfee Employee
Report Inappropriate Content
Message 2 of 5

Re: Converting IP address in Binary to Std format??

the RSD inbuilt function converts the IPV4 int value to string (as noted in reply to your other post)


Re: Converting IP address in Binary to Std format??

Hey Sailendra,

Thanks for helping. But This function RSDFN_ConvertIntToIPString is not there in my  funtions->scalar-valued-functions->..

I tried running the command but it says 'RSDFN_ConvertIntToIPString' is not a recognized built-in function name.

Which Epo version are u using and can u send me this functions location and definition..

thanks a lot,


Level 12
Report Inappropriate Content
Message 4 of 5

Re: Converting IP address in Binary to Std format??

If you are using ePO 4.0, you will need to install Rogue System Detection to get this function.

McAfee Employee tb_ng
McAfee Employee
Report Inappropriate Content
Message 5 of 5

Re: Converting IP address in Binary to Std format??

Thanks to the information from Greg's post, I was able to find a way to do this without installing Rogue System detection -- which I don't have approval to do in my environment (at least not yet).  I was able to extract the code from the RSD installation files that creates the function and use that to create a new stand-alone function.  I would recommend changing the name of the function (RSDFN_ConvertIntToIPString) so that any future installs/upgrades of RSD will not be impacted.  I just changed the RSDFN prefix on mine.

CREATE FUNCTION  [dbo].[RSDFN_ConvertIntToIPString]
    @ipin int
declare @o1 bigint, @o2 bigint, @o3 bigint, @o4  bigint;
declare @ip bigint;
-- This is the magic epo conversion  size...
    set @ip = (CAST(@ipin as bigint) + 2147483647) + 1;
    SET @o1 = @ip / 16777216;
    SET  @ip = @ip % 16777216;
    SET @o2 = @ip / 65536;
    SET @ip = @ip %  65536;
    SET @o3 = @ip / 256;
    SET @ip = @ip % 256;
    SET @o4 =  @ip;
        CONVERT(VARCHAR(4),  @o1) + '.' +
        CONVERT(VARCHAR(4), @o2) + '.' +
         CONVERT(VARCHAR(4), @o3) + '.' +
        CONVERT(VARCHAR(4),  @o4)
More McAfee Tools to Help You

Community Help Hub

    New to the forums or need help finding your way around the forums? There's a whole hub of community resources to help you.

  • Find Forum FAQs
  • Learn How to Earn Badges
  • Ask for Help
Go to Community Help

Join the Community

    Thousands of customers use the McAfee Community for peer-to-peer and expert product support. Enjoy these benefits with a free membership:

  • Get helpful solutions from McAfee experts.
  • Stay connected to product conversations that matter to you.
  • Participate in product groups led by McAfee employees.
Join the Community
Join the Community