00001 /* 00002 * Copyright (c) 2000 University of Southern California. 00003 * All rights reserved. 00004 * 00005 * Redistribution and use in source and binary forms are permitted 00006 * provided that the above copyright notice and this paragraph are 00007 * duplicated in all such forms and that any documentation, advertising 00008 * materials, and other materials related to such distribution and use 00009 * acknowledge that the software was developed by the University of 00010 * Southern California, Information Sciences Institute. The name of the 00011 * University may not be used to endorse or promote products derived from 00012 * this software without specific prior written permission. 00013 * 00014 * THIS SOFTWARE IS PROVIDED "AS IS" AND WITHOUT ANY EXPRESS OR IMPLIED 00015 * WARRANTIES, INCLUDING, WITHOUT LIMITATION, THE IMPLIED WARRANTIES OF 00016 * MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE. 00017 * 00018 * 00019 * NixVector classifier for stateless routing 00020 * contributed to ns from 00021 * George F. Riley, Georgia Tech, Spring 2000 00022 * 00023 */ 00024 00025 #ifndef __HDR_NV_H__ 00026 #define __HDR_NV_H__ 00027 00028 #include "packet.h" 00029 #include "nix/nixvec.h" 00030 00031 struct hdr_nv { 00032 NixVec* pNv; 00033 Nixl_t h_used; 00034 static int offset_; 00035 inline static int& offset() { return offset_; } 00036 inline static hdr_nv* access(Packet* p) { 00037 return (hdr_nv*) p->access(offset_); 00038 } 00039 00040 /* per-field member acces functions */ 00041 NixVec*& nv() { return (pNv); } 00042 Nixl_t* used() { return &h_used;} 00043 }; 00044 00045 00046 #endif 00047
1.3.3