Oracle FAQ | Your Portal to the Oracle Knowledge Grid |
![]() |
![]() |
Home -> Community -> Mailing Lists -> Oracle-L -> Re: UNIX : script help/input
Jared
Jared Still wrote:
>>Good! The more the merrier! Welcome to the club.
BITAND in PL/SQL works for INTEGER/PLS_INTEGER only.
> UTL_RAW has an XOR, but it requires RAW values and I didn't feel
> like messing with it.
>
> This is all very simple in Perl.
Sure!
> Given a MAC of 000050000AA, with a fixed portion of 00005000000,
> it is very easy to determine the variable portion of the address
> via $x = 0x000050000AA ^ 00005000000.
>
> Not quite so simple in PL/SQL.
"Globally unique addresses are allocated by the IEEE in blocks containing 2^24 (16,777,216) addresses. In each allocation, the first 3 octects are fixed (e.g. 00-00-0C is Cisco) and the last three octects are variable (e.g. 00-00-00 through FF-FF-FF). The fixed portion of the allocation is known formally as the Organizationally Unique Identifier (OUI), and infomally as the Ethernet Vendor ID. Often, the OUI portion of a MAC address is extremely helpful in indentifying which physical piece of equipment is generating a particular packet."
00-00-50 is for RADISYS CORPORATION, right?
x := SUBSTR('0x0000500000AA', -6);
Then you can use BITAND. However, I'm not saying that PL/SQL is better than perl -- every language has its own purpose.
-- Vladimir Begun The statements and opinions expressed here are my own and do not necessarily represent those of Oracle Corporation. -- Please see the official ORACLE-L FAQ: http://www.orafaq.net -- Author: Vladimir Begun INET: Vladimir.Begun_at_oracle.com Fat City Network Services -- 858-538-5051 http://www.fatcity.com San Diego, California -- Mailing list and web hosting services --------------------------------------------------------------------- To REMOVE yourself from this mailing list, send an E-Mail message to: ListGuru_at_fatcity.com (note EXACT spelling of 'ListGuru') and in the message BODY, include a line containing: UNSUB ORACLE-L (or the name of mailing list you want to be removed from). You may also send the HELP command for other information (like subscribing).Received on Wed Oct 01 2003 - 21:19:34 CDT
![]() |
![]() |