socket flag and offset look up