I have added -Nmisc/neti option to ld,see below:
$ cat hook_test.c
/*
* File: hook_test.c
* Author: stevens
*
* Created on 2008���6���15���, ������10:45
*/
#include <stdio.h>
#include <stdlib.h>
#include <sys/neti.h>
#include <netinet/in.h>
#include <sys/int_types.h>
#include <sys/queue.h>
#include <sys/hook_impl.h>
#include <sys/netstack.h>
/*
*
*/
int main(int argc, char** argv) {
net_data_t ipv4=net_lookup_impl(NHF_INET,NULL);
return (EXIT_SUCCESS);
}
$ cc -c hook_test.c
$ ld -Nmisc/amd64/neti -o hook_test hook_test.o
Undefined first referenced
symbol in file
net_lookup_impl hook_test.o
ld: fatal: Symbol referencing errors. No output written to hook_test
$nm /kernel/misc/amd64/neti|grep net_lookup_impl [46] | 976|
92|FUNC |GLOB |0 |2 |net_lookup_impl
This message posted from opensolaris.org
_______________________________________________
networking-discuss mailing list
[email protected]