Anonymous_User Absent Member.
Absent Member.
426 views

InitIP and TargetIP fields - What is IP type?


Hi,
I have tried to add some values to e.InitIP and e.TargetIP fields
through a custom collector but it seems both are IP type, not string.
Is there any function or method that I could call (passing as input IP
in string format) and get as return the IP type to be added to both
fields?

I got this IP type from Sentinel Event Configuration screen. Well, I
guess InitIP and TargetIP are IP types.

Thanks
HH


--
hugohigashi
------------------------------------------------------------------------
hugohigashi's Profile: http://forums.novell.com/member.php?userid=89996
View this thread: http://forums.novell.com/showthread.php?t=448368

0 Likes
3 Replies
Anonymous_User Absent Member.
Absent Member.

Re: InitIP and TargetIP fields - What is IP type?


well, i found the issue.. it seems to accept string values... in my
code, there was a blank character at the end of IP string value... that
caused the collector to not assign the right values to InitIP and
TargetIP... any other string worked but IP type seems to have some
function to make sure the value makes sense.


--
hugohigashi
------------------------------------------------------------------------
hugohigashi's Profile: http://forums.novell.com/member.php?userid=89996
View this thread: http://forums.novell.com/showthread.php?t=448368

0 Likes
Anonymous_User Absent Member.
Absent Member.

Re: InitIP and TargetIP fields - What is IP type?

-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

Yes, everything in there that is not an object is a plain old string
(ECMAscript is loosely typed). Thanks for posting back what you found.
What was the error message you were getting in case others see it and
can focus on the solution to that specific problem if/when that happens?

Good luck.
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v2.0.15 (GNU/Linux)
Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org/

iQIcBAEBAgAGBQJOxVvoAAoJEF+XTK08PnB5Mo0P/3qYWvN0+3yafjsjXPDxGKaM
VkLOhrLeYUD3bRnVescSqx40y5FgsvIX8BbYoZxAMZHaqSI7q6JsArHKAllawaaW
n90z12rAmJN53KIRRSC8lyuZJflE+mjilk0agO+tV0afbBFEnT98D+6KCnHDiAdr
QukhZRhiuyPZPflRVDKG5pAS3tnFtIrbsSHGlbqEbkQiiddH1NzX4zsotsFB6V/R
pF7qcSDY11EXeD1M9V4MJ/wESsjfYsE3nEkz5VoYwHqJGl21P97Ot5XUMkIfSKoh
CjlJNkLTNgw56zyC+7Dj1k5CXGcI7jkJy3jyee6/xByHRvthrQw9R2hHWbWANxCv
32iLQcUzIDCDvtXfd8hMTGzwyrPXZJaCxBbQCagyo4K78T870DgdGNlZe9ZDy+tp
fST9DfnXR+fflmtSXVnc/m2yRlPXKSwrMKLPEPbZrTxkBkbjvKPUkaIAB+fRqNsF
/YAo6hxQskkefNsO+DKcR3eecxpAj1M3BGyzQ8heJwrNZSG56NrHpxFdes1usqpL
P7DkQfzTj3EQ6ud0EBkQSLjF8lgCU2uDLlkxclsModka4k4TcyP44gvCH+1b3ZoO
NXWIL5sEqEgxK3SnZeHXki3stvIvnOaBVZ9QH0R0jQxPDOC7iNu+JqUAouOldxTy
+NLx/sFburNMUUy1fUfG
=q202
-----END PGP SIGNATURE-----
0 Likes
Anonymous_User Absent Member.
Absent Member.

Re: InitIP and TargetIP fields - What is IP type?


Hi Hugo,

The translation from the string representation of the IP (dotted-quad,
or xxx.xxx.xxx.xxx) actually happens at the Java layer. Since the
definition of a dotted-quad IP address does not include any spaces, of
course it fails if there are any characters like that in the string. It
would be nice if it would get rid of the whitespace for you, wouldn't
it?

Do note, however, that there is a String.trim() method you can use to
remove "outside" whitespace from any string. So if you know that your
event source sometimes gives you extra spaces, you might want to try
that out.

Also note that soon the IP fields will support both IPv4 and IPv6
notations.


--
DCorlette
------------------------------------------------------------------------
DCorlette's Profile: http://forums.novell.com/member.php?userid=4437
View this thread: http://forums.novell.com/showthread.php?t=448368

0 Likes
The opinions expressed above are the personal opinions of the authors, not of Micro Focus. By using this site, you accept the Terms of Use and Rules of Participation. Certain versions of content ("Material") accessible here may contain branding from Hewlett-Packard Company (now HP Inc.) and Hewlett Packard Enterprise Company. As of September 1, 2017, the Material is now offered by Micro Focus, a separately owned and operated company. Any reference to the HP and Hewlett Packard Enterprise/HPE marks is historical in nature, and the HP and Hewlett Packard Enterprise/HPE marks are the property of their respective owners.