5231 }
5232
5233 /*
5234 * Error if no M_DATA follows
5235 */
5236 nmp = mp->b_cont;
5237 if (nmp == NULL) {
5238 dluderrorind(wq, mp, (mp->b_rptr + off), len, DL_BADDATA, 0);
5239 return;
5240 }
5241 dlap = (struct fcipdladdr *)(mp->b_rptr + off);
5242
5243 /*
5244 * Now get the destination structure for the remote NPORT
5245 */
5246 ether_to_wwn(&dlap->dl_phys, &wwn);
5247 fdestp = fcip_get_dest(fptr, &wwn);
5248
5249 if (fdestp == NULL) {
5250 FCIP_DEBUG(FCIP_DEBUG_DLPI, (CE_NOTE,
5251 "udreq - couldn't find dest struct for remote port");
5252 dluderrorind(wq, mp, (mp->b_rptr + off), len, DL_BADDATA, 0));
5253 return;
5254 }
5255
5256 /*
5257 * Network header + SAP
5258 */
5259 hdr_size = sizeof (fcph_network_hdr_t) + sizeof (llc_snap_hdr_t);
5260
5261 /* DB_REF gives the no. of msgs pointing to this block */
5262 if ((DB_REF(nmp) == 1) &&
5263 (MBLKHEAD(nmp) >= hdr_size) &&
5264 (((uintptr_t)mp->b_rptr & 0x1) == 0)) {
5265 la_wwn_t wwn;
5266 nmp->b_rptr -= hdr_size;
5267
5268 /* first put the network header */
5269 headerp = (fcph_network_hdr_t *)nmp->b_rptr;
5270 if (ether_cmp(&dlap->dl_phys, &fcip_arpbroadcast_addr) == 0) {
5271 ether_to_wwn(&fcipnhbroadcastaddr, &wwn);
5272 } else {
|
5231 }
5232
5233 /*
5234 * Error if no M_DATA follows
5235 */
5236 nmp = mp->b_cont;
5237 if (nmp == NULL) {
5238 dluderrorind(wq, mp, (mp->b_rptr + off), len, DL_BADDATA, 0);
5239 return;
5240 }
5241 dlap = (struct fcipdladdr *)(mp->b_rptr + off);
5242
5243 /*
5244 * Now get the destination structure for the remote NPORT
5245 */
5246 ether_to_wwn(&dlap->dl_phys, &wwn);
5247 fdestp = fcip_get_dest(fptr, &wwn);
5248
5249 if (fdestp == NULL) {
5250 FCIP_DEBUG(FCIP_DEBUG_DLPI, (CE_NOTE,
5251 "udreq - couldn't find dest struct for remote port"));
5252 dluderrorind(wq, mp, (mp->b_rptr + off), len, DL_BADDATA, 0);
5253 return;
5254 }
5255
5256 /*
5257 * Network header + SAP
5258 */
5259 hdr_size = sizeof (fcph_network_hdr_t) + sizeof (llc_snap_hdr_t);
5260
5261 /* DB_REF gives the no. of msgs pointing to this block */
5262 if ((DB_REF(nmp) == 1) &&
5263 (MBLKHEAD(nmp) >= hdr_size) &&
5264 (((uintptr_t)mp->b_rptr & 0x1) == 0)) {
5265 la_wwn_t wwn;
5266 nmp->b_rptr -= hdr_size;
5267
5268 /* first put the network header */
5269 headerp = (fcph_network_hdr_t *)nmp->b_rptr;
5270 if (ether_cmp(&dlap->dl_phys, &fcip_arpbroadcast_addr) == 0) {
5271 ether_to_wwn(&fcipnhbroadcastaddr, &wwn);
5272 } else {
|