ncr.c revision 7c478bd95313f5f23a4c958a745db2134aa03244
/*
* This part for NCR UNIX with is from Andrew Maffei (arm@aqua.whoi.edu). It
* assumes TLI throughout. In order to look up endpoint address information
* we must talk to the "timod" streams module. For some reason "timod" wants
* to sit directly on top of the device driver. Therefore we pop off all
* streams modules except the driver, install the "timod" module so that we
* can figure out network addresses, and then restore the original state.
*/
#ifndef lint
#endif
#include <stdio.h>
#include <syslog.h>
#include <stropts.h>
#include "tcpd.h"
/* fromhost - tear down the streams stack then rebuild it */
struct request_info *request;
{
int i;
int num_mod;
/*
* On systems with WIN streams support we have to be careful about what
* is on the stream we are passed. This code POPs off all modules above
* the pseudo driver, pushes timod, gets the host address information,
* pops timod and then pushes all modules back on the stream.
*
* things to the stream depending on the TCP port being serviced. (not a
* very nice thing to do!). It is unclear what to do if this code breaks
* - the stream may be left in an unknown condition.
*/
tcpd_warn("fromhost: LIST failed: %m");
tcpd_warn("fromhost: LIST failed: %m");
/*
* POP stream modules except for the driver.
*/
for (i = 0; i < num_mod - 1; i++)
/*
* PUSH timod so that host address ioctls can be executed.
*/
tcpd_warn("fromhost: PUSH timod: %m");
/*
* POP timod, we're done with it now.
*/
tcpd_warn("fromhost: POP timod: %m");
/*
* Restore stream modules.
*/
for (i = num_mod - 2; i >= 0; i--)
}