def guess_kern_ipc_maxsockbuf():
 if (TRUENAS and ((hardware[0] == 'Z50') or (hardware[0] == 'Z35'))):
  return (16 * MB)
 elif (TRUENAS and (hardware[0] == 'Z30')):
  return (8 * MB)
 elif (TRUENAS and (hardware[0] == 'Z20')):
  return (4 * MB)
 elif (HW_PHYSMEM_GB > 180):
  return (16 * MB)
 elif (HW_PHYSMEM_GB > 84):
  return (8 * MB)
 elif (HW_PHYSMEM_GB > 44):
  return (4 * MB)
 else:
  return (2 * MB)

def guess_kern_ipc_maxsockbuf ( ) : if ( TRUENAS and ( ( hardware [ 0 ] == 'Z50' ) or ( hardware [ 0 ] == 'Z35' ) ) ) : return ( 16 * MB ) elif ( TRUENAS and ( hardware [ 0 ] == 'Z30' ) ) : return ( 8 * MB ) elif ( TRUENAS and ( hardware [ 0 ] == 'Z20' ) ) : return ( 4 * MB ) elif ( HW_PHYSMEM_GB > 180 ) : return ( 16 * MB ) elif ( HW_PHYSMEM_GB > 84 ) : return ( 8 * MB ) elif ( HW_PHYSMEM_GB > 44 ) : return ( 4 * MB ) else : return ( 2 * MB )
maximum socket buffer .