src/devices/wifi/ssid.h
author Mathieu Lacage <mathieu.lacage@sophia.inria.fr>
Mon, 08 Oct 2007 15:58:07 +0200
changeset 1913 4e4ea4809c3d
parent 1888 dbeef4fcff5a
child 1937 996383a87ae3
permissions -rw-r--r--
implement broadcast/multicast MacStation

/* -*-  Mode: C++; c-file-style: "gnu"; indent-tabs-mode:nil; -*- */
/*
 * Copyright (c) 2006 INRIA
 * All rights reserved.
 *
 * This program is free software; you can redistribute it and/or modify
 * it under the terms of the GNU General Public License version 2 as 
 * published by the Free Software Foundation;
 *
 * This program is distributed in the hope that it will be useful,
 * but WITHOUT ANY WARRANTY; without even the implied warranty of
 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
 * GNU General Public License for more details.
 *
 * You should have received a copy of the GNU General Public License
 * along with this program; if not, write to the Free Software
 * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307  USA
 *
 * Author: Mathieu Lacage <mathieu.lacage@sophia.inria.fr>
 */
#ifndef SSID_H
#define SSID_H

#include <stdint.h>

namespace ns3 {

class Ssid {
public:
  /* 0-terminated string */
  Ssid ();
  Ssid (char const *ssid);
  Ssid (char const ssid[32], uint8_t length);

  bool IsEqual (Ssid const &o) const;
  bool IsBroadcast (void) const;

  uint32_t GetLength (void) const;
  void Peek (uint8_t[32]) const;
  void Set (uint8_t[32], uint32_t len);

  static Ssid GetBroadcast (void);
private:
  char m_ssid[33];
  uint8_t m_length;
};

}; // namespace ns3

#endif /* SSID_H */