cvs commit: src/lib/libnetgraph msg.c src/sys/netgraph ng_message.h
Gleb Smirnoff
glebius at FreeBSD.org
Thu Jan 12 11:14:41 PST 2006
glebius 2006-01-12 19:14:40 UTC
FreeBSD src repository
Modified files:
lib/libnetgraph msg.c
sys/netgraph ng_message.h
Log:
In the splnet(9) times netgraph(4) was synchronous and if a message
had been replied, the reply was always delivered to the originator
synchronously.
With introduction of netgraph item callbacks and a wait channel with
mutex in ng_socket(4), we have fixed the problem with ngctl(8) returning
earlier than the command has been proceeded by target node. But still
ngctl(8) can return prior to the reply has arrived to its node.
To fix this:
- Introduce a new flag for netgraph(4) messages - NGM_HASREPLY.
This flag is or'ed with message like NGM_READONLY.
- In netgraph userland library if we have sent a message with
NGM_HASREPLY flag, then select(2) until reply comes.
- Mark appropriate generic commands with NGM_HASREPLY flag,
gathering them into one enum {}. Bump generic cookie.
Revision Changes Path
1.12 +16 -0 src/lib/libnetgraph/msg.c
1.28 +31 -17 src/sys/netgraph/ng_message.h
More information about the cvs-src
mailing list