It appears to me that macaddr_manuf can be defined as this:
macaddr * macaddr_trunc (macaddr *addr)
if (addr==NULL) return NULL;
result=(macaddr *) palloc(sizeof(struct macaddr));
create function macaddr_trunc(macaddr) returns macaddr as
'MODULE_PATHNAME' language 'c';
create function macaddr_manuf(macaddr) returns varchar2 as '
select name from macaddr_blah where mac=macaddr_trunc($1)
' language 'sql';
Be warned, this code was typed directly in editor and not compiled ;P
Unfortunately, I don't have time to make a full-fledged contrib out of
this and Larry's awk files.
On Tue, 1 Aug 2000, Larry Rosenman wrote:
> Any comments at all from anyone on my mail from Sunday Nite on
> making the macaddr_manuf function just return a
> masked MACADDR (I.E. set the low 3 bytes to 0x00) and how we
> do this in the code?
> Any comments on the ouiparse.awk script?
In response to
- mac.c at 2000-08-02 01:55:19 from Larry Rosenman
pgsql-hackers by date
|Next:||From: Thomas Lockhart||Date: 2000-08-02 06:10:34|
|Subject: Re: [HACKERS] random() function produces wrong range|
|Previous:||From: Larry Rosenman||Date: 2000-08-02 01:55:19|