- IFTRACE(D_CONN)
- tptrace(TPPTmisc, "ENTER GET MTU: size negot \n",*size, *negot, 0, 0);
- ENDTRACE
-
- *size = 1 << *negot;
-
- if( *size > windowsize ) {
- *size = windowsize;
- }
-
- if (rt == 0 || (rt->rt_flags & RTF_UP == 0) ||
- (ia = (struct iso_ifaddr *)rt->rt_ifa) == 0 ||
- (ifp = ia->ia_ifp) == 0) {
- IFDEBUG(D_CONN)
- printf("tpclnp_mtu routing abort rt=0x%x ia=0x%x ifp=0x%x\n",
- rt, ia, ifp)
- ENDDEBUG
- return;
- }
-
-
-
- /* TODO - make this indirect off the socket structure to the
- * network layer to get headersize
- */
- clnp_size = sizeof(struct clnp_fixed) + sizeof(struct clnp_segment) +
- 2 * sizeof(struct iso_addr);
- mtu = SN_MTU(ifp, rt) - clnp_size;
- if(*size > mtu) {
- *size = mtu;
- sizeismtu = 1;
- }
- /* have to transform size to the log2 of size */
- for(i=TP_MIN_TPDUSIZE; (i<=TP_MAX_TPDUSIZE && ((1<<i) <= *size)) ; i++)
- ;
- i--;
-
- IFTRACE(D_CONN)
- tptrace(TPPTmisc, "GET MTU MID: tpcb size negot i \n",
- *size, *negot, i, 0);
- ENDTRACE
-
- *size = 1<<i;
- *negot = i;
+ tpcb->tp_routep = &(isop->isop_route.ro_rt);
+ if (tpcb->tp_netservice == ISO_CONS)
+ return 0;
+ else
+ return (sizeof(struct clnp_fixed) + sizeof(struct clnp_segment) +
+ 2 * sizeof(struct iso_addr));