buglwIP - A Lightweight TCP/IP stack - Bugs: bug #31304, macro SHUT_RD,SHUT_WR,SHUT_RDWR...

 
 

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

bug #31304: macro SHUT_RD,SHUT_WR,SHUT_RDWR need to change

Submitted by:  hanhui <hanhui03>
Submitted on:  Mon 11 Oct 2010 03:19:33 PM UTC  
 
Category: sockets/netconnSeverity: 3 - Normal
Item Group: Change RequestStatus: Fixed
Privacy: PublicAssigned to: Simon Goldschmidt <goldsimon>
Open/Closed: ClosedPlanned Release: None
lwIP version: CVS Head

Sat 20 Nov 2010 05:47:04 PM UTC, comment #3:

> I think an example of an OS where they match the lwIP ones is Windows.


I didn't really think about other OSes when implementing that one. Instead, I just copied the netconn definitions - these must be 1,2,3 since used as a bit mask. However, there's no reason the socket.h defines shouldn't resemble what other stacks do.

Fixed, thanks for reporting.

Simon Goldschmidt <goldsimon>
Project AdministratorIn charge of this item.
Mon 11 Oct 2010 04:30:37 PM UTC, comment #2:

the following defination is in <WinSock2.h>

/*

  • WinSock 2 extension -- manifest constants for shutdown()

*/

#define SD_RECEIVE 0x00
#define SD_SEND 0x01
#define SD_BOTH 0x02

hanhui <hanhui03>
Mon 11 Oct 2010 04:00:50 PM UTC, comment #1:

I think an example of an OS where they match the lwIP ones is Windows.

Kieran Mansley <kieranm>
Project Administrator
Mon 11 Oct 2010 03:19:33 PM UTC, original submission:

On most operating system,

#define SHUT_RD 0
#define SHUT_WR 1
#define SHUT_RDWR 2

but lwip defination is :

#define SHUT_RD 1
#define SHUT_WR 2
#define SHUT_RDWR 3

Many applications directly use 0 or 1 or 2 rather than use macros.

hanhui <hanhui03>

 

No files currently attached

 

Depends on the following items: None found

Items that depend on this one: None found

 

Carbon-Copy List
  • -unavailable- added by goldsimon (Posted a comment)
  • -unavailable- added by kieranm (Posted a comment)
  • -unavailable- added by hanhui03 (Submitted the item)
  •  

    Do you think this task is very important?
    If so, you can click here to add your encouragement to it.
    This task has 0 encouragements so far.

    Only logged-in users can vote.

     

    Please enter the title of George Orwell's famous dystopian book (it's a date):

     

     

    Follow 3 latest changes.

    Date Changed By Updated Field Previous Value => Replaced By
    Sat 20 Nov 2010 05:47:04 PM UTCgoldsimonStatusNone=>Fixed
      Assigned toNone=>goldsimon
      Open/ClosedOpen=>Closed

    Back to the top


    Powered by Savane 3.1-cleanup1