1
0
mirror of https://github.com/samba-team/samba.git synced 2025-01-11 05:18:09 +03:00

r3602: Add looking up transport by endpoint protocol

(This used to be commit 76c02ecbe8)
This commit is contained in:
Jelmer Vernooij 2004-11-07 19:28:18 +00:00 committed by Gerald (Jerry) Carter
parent 485df40bf9
commit add049380e

View File

@ -517,6 +517,22 @@ static NTSTATUS dcerpc_floor_set_rhs_data(TALLOC_CTX *mem_ctx, struct epm_floor
return NT_STATUS_NOT_SUPPORTED;
}
enum dcerpc_transport_t dcerpc_transport_by_endpoint_protocol(int prot)
{
int i;
/* Find a transport that has 'prot' as 4th protocol */
for (i=0;i<ARRAY_SIZE(transports);i++) {
if (transports[i].num_protocols >= 2 &&
transports[i].protseq[1] == prot) {
return transports[i].transport;
}
}
/* Unknown transport */
return -1;
}
enum dcerpc_transport_t dcerpc_transport_by_tower(struct epm_tower *tower)
{
int i;