tasklwIP - A Lightweight TCP/IP stack - Tasks: task #10374, struct sockaddr_in can be...

 
 

You are not allowed to post comments on this tracker with your current authentication level.

task #10374: struct sockaddr_in can be typedef-ed

Submitter:  Iordan Neshev <iordan_neshev>
Submitted:  Tue 11 May 2010 11:12:21 AM UTC
   
 
Category:  None Should Start On:  Tue 11 May 2010 12:00:00 AM UTC
Should be Finished on:  Tue 11 May 2010 12:00:00 AM UTC Priority:  5 - Normal
Status:  Cancelled Privacy:  Public
Assigned to:  None Percent Complete:  0%
Open/Closed:  Closed Planned Release:  None
Effort:  0.00

Tue 11 May 2010 04:35:42 PM UTC, comment #2: 

Cool. That answers my question why it was not done together with ip_addr_t.

Iordan Neshev <iordan_neshev>
Tue 11 May 2010 04:32:14 PM UTC, comment #1: 

I'm sorry to turn you down on that, but sockaddr_in is meant to be a compatibility structure which is defined in the standard (see opengroup). If we changed it from a struct to a typedef, we would lose the portability we wanted to achieve.

Simon Goldschmidt <goldsimon>
Group administrator
Tue 11 May 2010 11:12:21 AM UTC, original submission:  

Recently struct ip_addr was typedef-ed to ip_addr_t
and the code now looks much more clear and readable.
The same can be done with struct sockaddr_in in sockets.h:

typedef struct {
  u8_t sin_len;
  u8_t sin_family;
  u16_t sin_port;
  struct in_addr sin_addr;
  char sin_zero[8];
} sockaddr_in_t;

Iordan Neshev <iordan_neshev>

 

(Note: upload size limit is set to 16384 kB, after insertion of the required escape characters.)

No files currently attached

 

Depends on the following items: None found

Items that depend on this one: None found

 

Carbon-Copy List
  • -email is unavailable- added by goldsimon (Posted a comment)
  • -email is unavailable- added by iordan_neshev (Submitted the item)
  •  

    There are 0 votes so far. Votes easily highlight which items people would like to see resolved in priority, independently of the priority of the item set by tracker managers.

     

    Follow 2 latest changes.

    Date Changed by Updated Field Previous Value => Replaced by
    2010-05-11 goldsimon StatusNone Cancelled
        Open/ClosedOpen Closed

    Back to the top

    Powered by Savane 3.13-d3ae.
    Corresponding source code