Renamed FRAGMAN to more logical frag_t
FossilOrigin-Name: 4305c35a65a5b3613287f1f4258df5de123b2dccb8b9573177953660ace06d4f
This commit is contained in:
parent
8dd6faf09f
commit
e35aae0911
@ -81,7 +81,7 @@ struct conn {
|
|||||||
|
|
||||||
|
|
||||||
/** The framgent manager used on this connection */
|
/** The framgent manager used on this connection */
|
||||||
FRAGMAN *fragman;
|
frag_t *fragman;
|
||||||
|
|
||||||
/** Current Fragment ID */
|
/** Current Fragment ID */
|
||||||
int fragid;
|
int fragid;
|
||||||
|
@ -23,9 +23,9 @@
|
|||||||
*
|
*
|
||||||
* Usage goes as follows.
|
* Usage goes as follows.
|
||||||
*
|
*
|
||||||
* First create a FRAGMAN object:
|
* First create a frag_t object:
|
||||||
*
|
*
|
||||||
* FRAGMAN * fm = fragman_create()
|
* frag_t * fm = fragman_create()
|
||||||
*
|
*
|
||||||
* Now you can add received fragmented packets to the fragment manager:
|
* Now you can add received fragmented packets to the fragment manager:
|
||||||
*
|
*
|
||||||
@ -97,7 +97,7 @@ static struct frag * frag_new(struct frag * frags, int fragid)
|
|||||||
}
|
}
|
||||||
|
|
||||||
/*
|
/*
|
||||||
void fragman_free(FRAGMAN * frags,struct frag * f)
|
void fragman_free(frag_t * frags,struct frag * f)
|
||||||
{
|
{
|
||||||
int i;
|
int i;
|
||||||
for (i=0; i<FRAG_MAXIDS; i++){
|
for (i=0; i<FRAG_MAXIDS; i++){
|
||||||
@ -110,7 +110,7 @@ void fragman_free(FRAGMAN * frags,struct frag * f)
|
|||||||
}
|
}
|
||||||
*/
|
*/
|
||||||
|
|
||||||
uint8_t * fragman_add(FRAGMAN * frags, uint8_t *packet, int hlen, int payloadlen)
|
uint8_t * fragman_add(frag_t * frags, uint8_t *packet, int hlen, int payloadlen)
|
||||||
{
|
{
|
||||||
struct frag * f;
|
struct frag * f;
|
||||||
uint32_t val0,val1;
|
uint32_t val0,val1;
|
||||||
@ -179,9 +179,9 @@ uint8_t * fragman_add(FRAGMAN * frags, uint8_t *packet, int hlen, int payloadlen
|
|||||||
return NULL;
|
return NULL;
|
||||||
}
|
}
|
||||||
|
|
||||||
FRAGMAN * fragman_create()
|
frag_t * fragman_create()
|
||||||
{
|
{
|
||||||
FRAGMAN * frags;
|
frag_t * frags;
|
||||||
frags = malloc(sizeof(struct frag)*FRAG_MAXIDS);
|
frags = malloc(sizeof(struct frag)*FRAG_MAXIDS);
|
||||||
if (frags == NULL )
|
if (frags == NULL )
|
||||||
return NULL;
|
return NULL;
|
||||||
@ -189,7 +189,7 @@ FRAGMAN * fragman_create()
|
|||||||
return frags;
|
return frags;
|
||||||
}
|
}
|
||||||
|
|
||||||
void fragman_destroy(FRAGMAN * frags)
|
void fragman_destroy(frag_t * frags)
|
||||||
{
|
{
|
||||||
int i;
|
int i;
|
||||||
for (i=0;i<FRAG_MAXIDS; i++){
|
for (i=0;i<FRAG_MAXIDS; i++){
|
||||||
|
@ -46,19 +46,19 @@ struct frag {
|
|||||||
uint8_t * header;
|
uint8_t * header;
|
||||||
};
|
};
|
||||||
|
|
||||||
typedef struct frag FRAGMAN;
|
typedef struct frag frag_t; //FRAGMAN;
|
||||||
|
|
||||||
|
|
||||||
//extern struct frag * fragman_add(struct frag * frags[], uint8_t *packet, int len); // struct cw_transport_header * th)
|
//extern struct frag * fragman_add(struct frag * frags[], uint8_t *packet, int len); // struct cw_transport_header * th)
|
||||||
//extern uint8_t * fragman_add(struct frag * frags, uint8_t *packet, int len); // struct cw_transport_header * th)
|
//extern uint8_t * fragman_add(struct frag * frags, uint8_t *packet, int len); // struct cw_transport_header * th)
|
||||||
extern uint8_t * fragman_add( FRAGMAN * frags, uint8_t *packet, int hlen, int payloadlen );
|
extern uint8_t * fragman_add( frag_t * frags, uint8_t *packet, int hlen, int payloadlen );
|
||||||
|
|
||||||
extern FRAGMAN * fragman_create();
|
extern frag_t * fragman_create();
|
||||||
extern void fragman_destroy(FRAGMAN * frags);
|
extern void fragman_destroy(frag_t * frags);
|
||||||
|
|
||||||
|
|
||||||
//extern frag_init(struct frag ** frag[]);
|
//extern frag_init(struct frag ** frag[]);
|
||||||
extern void fragman_free(FRAGMAN * frags,struct frag * f);
|
extern void fragman_free(frag_t * frags,struct frag * f);
|
||||||
|
|
||||||
|
|
||||||
#endif
|
#endif
|
||||||
|
Loading…
Reference in New Issue
Block a user