Lines Matching refs:item
50 // there are no items (or one corrupted item)
53 ppp_configure_item *item;
56 item = (ppp_configure_item*) (header.data + position);
57 if (item->length < 2)
59 // found a corrupted item
61 position += item->length;
62 AddItem(item);
89 /*! \brief Adds a new configure item to this packet.
91 Make sure all values are correct because the item will be copied. If the item's
94 \param item The item.
95 \param index Item's index. Adds after the last item if not specified or negative.
102 KPPPConfigurePacket::AddItem(const ppp_configure_item *item, int32 index)
104 if (!item || item->length < 2)
107 ppp_configure_item *add = (ppp_configure_item*) malloc(item->length);
108 memcpy(add, item, item->length);
124 //! Removes an item. The item \e must belong to this packet.
126 KPPPConfigurePacket::RemoveItem(ppp_configure_item *item)
128 if (!fItems.HasItem(item))
131 fItems.RemoveItem(item);
132 free(item);
138 //! Returns the item at \a index or \c NULL.
142 ppp_configure_item *item = fItems.ItemAt(index);
144 if (item == fItems.GetDefaultItem())
147 return item;
151 //! Returns the item of a special \a type or \c NULL.
155 ppp_configure_item *item;
158 item = ItemAt(index);
159 if (item && item->type == type)
160 return item;
197 ppp_configure_item *item;
200 item = ItemAt(index);
203 if (MRU - length < item->length) {
208 memcpy(header->data + length, item, item->length);
209 length += item->length;