Added Linux get_pinhole_uid_by_index.
This commit is contained in:
parent
e907d7bba6
commit
7c7407099e
|
@ -384,6 +384,16 @@ get_pinhole_info(unsigned short uid,
|
||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
int get_pinhole_uid_by_index(int index)
|
||||||
|
{
|
||||||
|
struct pinhole_t * p;
|
||||||
|
|
||||||
|
for(p = pinhole_list.lh_first; p != NULL; p = p->entries.le_next)
|
||||||
|
if (!index--)
|
||||||
|
return p->uid;
|
||||||
|
return -1;
|
||||||
|
}
|
||||||
|
|
||||||
int
|
int
|
||||||
clean_pinhole_list(unsigned int * next_timestamp)
|
clean_pinhole_list(unsigned int * next_timestamp)
|
||||||
{
|
{
|
||||||
|
|
|
@ -27,6 +27,8 @@ get_pinhole_info(unsigned short uid,
|
||||||
unsigned int * timestamp,
|
unsigned int * timestamp,
|
||||||
u_int64_t * packets, u_int64_t * bytes);
|
u_int64_t * packets, u_int64_t * bytes);
|
||||||
|
|
||||||
|
int get_pinhole_uid_by_index(int index);
|
||||||
|
|
||||||
int clean_pinhole_list(unsigned int * next_timestamp);
|
int clean_pinhole_list(unsigned int * next_timestamp);
|
||||||
|
|
||||||
#endif /* ENABLE_UPNPPINHOLE */
|
#endif /* ENABLE_UPNPPINHOLE */
|
||||||
|
|
Loading…
Reference in New Issue